Documentation
¶
Index ¶
- Constants
- Variables
- func AcquireTemplateLock(name, message string) (*filelock.Lock, error)
- func DefaultNetworkConfig() *container.NetworkConfig
- func EnsureCloneTemplate(backingFilesystem string, series string, ...) (_ golxc.Container, err error)
- func NewContainerInitialiser(series string) container.Initialiser
- func NewContainerManager(conf container.ManagerConfig, imageURLGetter container.ImageURLGetter, ...) (container.Manager, error)
Constants ¶
View Source
const ( // DefaultLxcBridge is the package created container bridge DefaultLxcBridge = "lxcbr0" // Btrfs is special as we treat it differently for create and clone. Btrfs = "btrfs" )
Variables ¶
View Source
var ( LxcContainerDir = golxc.GetDefaultLXCContainerDir() LxcRestartDir = "/etc/lxc/auto" LxcObjectFactory = golxc.Factory() )
FsCommandOutput calls cmd.Output, this is used as an overloading point so we can test what *would* be run without actually executing another program
Functions ¶
func DefaultNetworkConfig ¶
func DefaultNetworkConfig() *container.NetworkConfig
DefaultNetworkConfig returns a valid NetworkConfig to use the defaultLxcBridge that is created by the lxc package.
func EnsureCloneTemplate ¶
func EnsureCloneTemplate( backingFilesystem string, series string, networkConfig *container.NetworkConfig, authorizedKeys string, aptProxy proxy.Settings, aptMirror string, enablePackageUpdates bool, enableOSUpgrades bool, imageURLGetter container.ImageURLGetter, useAUFS bool, callback func(containerStatus status.Status, info string, data map[string]interface{}) error, ) (_ golxc.Container, err error)
Make sure a template exists that we can clone from.
func NewContainerInitialiser ¶
func NewContainerInitialiser(series string) container.Initialiser
NewContainerInitialiser returns an instance used to perform the steps required to allow a host machine to run a LXC container.
func NewContainerManager ¶
func NewContainerManager( conf container.ManagerConfig, imageURLGetter container.ImageURLGetter, loopDeviceManager looputil.LoopDeviceManager, ) (container.Manager, error)
NewContainerManager returns a manager object that can start and stop lxc containers. The containers that are created are namespaced by the name parameter inside the given ManagerConfig.
Types ¶
This section is empty.
Source Files
¶
- clonetemplate.go
- initialisation.go
- instance.go
- lxc.go
Click to show internal directories.
Click to hide internal directories.