Documentation
¶
Index ¶
- Variables
- 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) CreateImage(image api.ImagesPost, args *lxd.ImageCreateArgs) (string, 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 ¶
var (
ErrParse = errors.New("parse error")
)
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 will copy an image from the specified server waits till operation is done
func (*LXO) CreateContainer ¶
func (l *LXO) CreateContainer(container api.ContainersPost) error
CreateContainer will create the container and waits till operation is done
func (*LXO) CreateImage ¶ added in v0.4.1
func (l *LXO) CreateImage(image api.ImagesPost, args *lxd.ImageCreateArgs) (string, error)
CreateImage will create an image and waits till operation is done. Returns resulting fingerprint
func (*LXO) DeleteContainer ¶
DeleteContainer will delete the container and waits till operation is done
func (*LXO) DeleteImage ¶
DeleteImage will delete an image and waits till operation is done
func (*LXO) StartContainer ¶
StartContainer will start the container and waits till operation is done
func (*LXO) StopContainer ¶
StopContainer will try to stop the container and waits till operation is done
func (*LXO) UpdateContainer ¶
UpdateContainer will create the container and waits till operation is done