containers

package
v0.0.0-...-5eafe9c Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UID int64
	GID int64
)

Functions

func CreateContainer

func CreateContainer(config ContainerConfig, is lxdclient.InstanceServer) (string, error)

func CreateContainerProfile

func CreateContainerProfile(is lxdclient.InstanceServer) error

func DeleteContainer

func DeleteContainer(containerName string, is lxd.InstanceServer) error

func GetContainerLXDIP

func GetContainerLXDIP(name string, blacklist []string, is lxd.InstanceServer) (net.IP, error)

GetContainerLXDIP returns the IP address of the container on the LXD network (and not the cni0 flannel.1 network devices). This is usually on eth0.

func RecursiveMkdir

func RecursiveMkdir(container, dir string, mode os.FileMode, UID, GID int64, is lxdclient.InstanceServer) error

func RunCommand

func RunCommand(container, command string, is lxdclient.InstanceServer) error

func RunCommands

func RunCommands(container string, commands []string, is lxdclient.InstanceServer) error

func StartContainer

func StartContainer(containerName string, is lxd.InstanceServer) error

func StopContainer

func StopContainer(containerName string, is lxd.InstanceServer) error

func UploadFile

func UploadFile(data []byte, from, to, container string, is lxdclient.InstanceServer) error

from is a file, to is a dir

func UploadFiles

func UploadFiles(froms []string, to, container string, is lxdclient.InstanceServer) error

func WaitContainerIP

func WaitContainerIP(name string, blacklist []string, is lxd.InstanceServer) (net.IP, error)

Types

type ContainerConfig

type ContainerConfig struct {
	ImageName   string
	ClusterName string
	StoragePool string
	NetworkID   string
}

Jump to

Keyboard shortcuts

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