container

package
v0.0.0-...-8d9c0eb Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2022 License: MPL-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const StageSuffix = ".stage"

Variables

This section is empty.

Functions

func OpenAndShowInfo

func OpenAndShowInfo(usrdata *userdata.Userdata, name string) error

Types

type Auth

type Auth int
const (
	AuthAuto Auth = iota
	AuthManual
)

func (Auth) MarshalJSON

func (auth Auth) MarshalJSON() ([]byte, error)

func (*Auth) Set

func (auth *Auth) Set(value string) error

func (Auth) String

func (auth Auth) String() string

func (*Auth) UnmarshalJSON

func (auth *Auth) UnmarshalJSON(data []byte) error

type Config

type Config struct {
	Image             string
	Boot              bool
	Auth              Auth
	XdgDesktopExports []string
	XdgDesktopExtra   []string
	ExtraCapabilities []string
	SyscallFilters    []string
	ExtraBindMounts   []string
	PrivateDirs       []string
	ShareCgroupfs     bool
	ShareDevices      []string
	VirtualNetwork    bool
}

type Container

type Container struct {
	Name   string
	Path   string
	Config *Config
}

func CreateStaged

func CreateStaged(usrdata *userdata.Userdata, name string, initialConfig Config) (*Container, error)

func Open

func Open(usrdata *userdata.Userdata, name string) (*Container, error)

func OpenPath

func OpenPath(path, name string) (*Container, error)

func (Container) ApplyEnvironFilter

func (container Container) ApplyEnvironFilter(usrdata *userdata.Userdata)

func (Container) ExportsInstance

func (container Container) ExportsInstance(n int) string
func (container Container) ExportsLink(temp bool) string

func (Container) Leader

func (container Container) Leader(usrdata *userdata.Userdata) (uint32, error)

func (Container) Lock

func (container Container) Lock(level LockLevel, wait LockWaitRequest) (*Lock, error)

func (Container) LockAndDelete

func (container Container) LockAndDelete(wait LockWaitRequest) error

func (Container) LockUntilProcessDeath

func (container Container) LockUntilProcessDeath(level LockLevel, wait LockWaitRequest) error

func (Container) MachineName

func (container Container) MachineName(usrdata *userdata.Userdata) string

func (Container) PrivateHomeStorage

func (container Container) PrivateHomeStorage(usrdata *userdata.Userdata) string

func (Container) PrivateHomeStorageChild

func (container Container) PrivateHomeStorageChild(usrdata *userdata.Userdata,
	children ...string) string

func (Container) Rename

func (container Container) Rename(newname string) error

func (Container) Shell

func (container Container) Shell(usrdata *userdata.Userdata) string

func (Container) ShowInfo

func (ct Container) ShowInfo(usrdata *userdata.Userdata) error

func (Container) Staged

func (container Container) Staged() bool

func (Container) Storage

func (container Container) Storage() string

func (Container) StorageChild

func (container Container) StorageChild(children ...string) string

func (Container) Unstage

func (container Container) Unstage() error

func (Container) UpdateConfig

func (container Container) UpdateConfig() error

func (Container) UpdateManualPassword

func (container Container) UpdateManualPassword(pass []byte) error

type Lock

type Lock struct {
	// contains filtered or unexported fields
}

func (*Lock) Release

func (l *Lock) Release()

type LockLevel

type LockLevel int
const (
	RunLock LockLevel = iota
	ExportsLock
	ConfigLock
	FullContainerLock
)

Order is significant! In order to take a full container lock, all levels below it must be locked.

type LockWaitRequest

type LockWaitRequest int
const (
	WaitForLock LockWaitRequest = iota
	NoWaitForLock
)

Jump to

Keyboard shortcuts

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