package
0.0.0-20230227000145-7f8d8f8780fe
Repository: https://github.com/neophenix/lxdepot.git
Documentation: pkg.go.dev
# Functions
CreateContainer creates a container from the given image, with the provided name on the LXD host.
CreateFile creates a file or directory on the container.
DeleteContainer removes a container from a host.
ExecCommand runs a command on the container and discards the output.
GetContainers asks for a list of containers from each LXD host, then optionally calls GetContainerState on each container to populate state information (IP, CPU / Memory / Disk usage, etc).
GetContainerState calls out to our LXD host to get the state of the container.
GetHostResources grabs (the kind of limited) info about a host, available CPU cores, Memory, ...
GetImages calls each LXD host to get a list of images available on each.
GetStoragePools gets a list of all the storage pools available for each host.
IsManageable just checks our lock flag, user.lxdepot_lock to see if it is "true" or not.
MoveContainer will move (copy in lxd speak) a container from one server to another.
StartContainer starts a stopped container.
StopContainer stops a running container.
# Variables
Conf is our main config.
# Structs
ContainerInfo is a conversion / grouping of useful container information as returned from the lxd client.
DiscardCloser is a WriteCloser that just discards data.
HostResourceInfo is a group of Host and Resources as returned by lxd.
ImageInfo like above is a grouping of useful image information for the frontend.