lxd

package
v0.0.0-...-642d354 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2021 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LXD

type LXD struct {
	Datastore datastore.Datastore
	SystemSrv system.Srv
}

LXD services

func NewLXD

func NewLXD(ds datastore.Datastore, sysSrv system.Srv) *LXD

NewLXD creates a new LXD client

func (*LXD) CheckConnections

func (lx *LXD) CheckConnections() []domain.SettingAvailable

CheckConnections checks the snap interfaces are connected

func (*LXD) GetImageAlias

func (lx *LXD) GetImageAlias(name string) error

GetImageAlias checks of an image alias is available

func (*LXD) RunBuild

func (lx *LXD) RunBuild(buildID, name, repo, branch, keyID, distro string) error

RunBuild runs a build by launching a container for the build request

func (*LXD) StopAndDeleteContainer

func (lx *LXD) StopAndDeleteContainer(name string) error

StopAndDeleteContainer stops and removes a container

type Service

type Service interface {
	RunBuild(buildID, name, repo, branch, keyID, distro string) error
	GetImageAlias(name string) error
	CheckConnections() []domain.SettingAvailable
	StopAndDeleteContainer(name string) error
}

Service is the interface for the LXD service

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL