Documentation ¶
Index ¶
- type LXO
- func (l *LXO) CopyImage(source lxd.ImageServer, image api.Image, args *lxd.ImageCopyArgs) error
- func (l *LXO) CreateContainer(container api.ContainersPost) error
- func (l *LXO) DeleteContainer(id string) error
- func (l *LXO) DeleteImage(hash string) error
- func (l *LXO) StartContainer(id string) error
- func (l *LXO) StopContainer(id string, timeout, retries int) error
- func (l *LXO) UpdateContainer(id string, container api.ContainerPut, etag string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LXO ¶
type LXO struct {
// contains filtered or unexported fields
}
LXO abstracts some of the lxd calls with additional functionality like retrying, idempotency and some level of error recovery. Usage stays the same as lxd.ContainerServer
func (*LXO) CopyImage ¶
func (l *LXO) CopyImage(source lxd.ImageServer, image api.Image, args *lxd.ImageCopyArgs) error
CopyImage copies an image from the specified server and wait till operation is done or return an error
func (*LXO) CreateContainer ¶
func (l *LXO) CreateContainer(container api.ContainersPost) error
CreateContainer will create the container and wait till operation is done or return an error
func (*LXO) DeleteContainer ¶
DeleteContainer will delete the container and wait till operation is done or return an error
func (*LXO) DeleteImage ¶
DeleteImage deletes an image and wait till operation is done or return an error
func (*LXO) StartContainer ¶
StartContainer will start the container and wait till operation is done or return an error
func (*LXO) StopContainer ¶
StopContainer will try to stop the container with provided name. It will retry for half a minute and return success when it's stopped.
func (*LXO) UpdateContainer ¶
UpdateContainer will create the container and wait till operation is done or return an error