Documentation
¶
Index ¶
Constants ¶
View Source
const ( OVSTag = "ovs" OVSBackPlane = "backplane" OVSVXBackend = "vxbackend" )
View Source
const ( BackendBaseDir = "/var/cache/containers" ContainerBaseRootDir = "/mnt/containers" )
View Source
const ( DefaultBridgeName = "core0" ContainersHardLimit = 1000 )
View Source
const ( NicStateConfigured = NicState("configured") NicStateDestroyed = NicState("destroyed") NicStateUnknown = NicState("unknown") NicStateError = NicState("error") )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container interface {
ID() uint16
Arguments() ContainerCreateArguments
}
type ContainerArguments ¶
type ContainerArguments struct {
Container uint16 `json:"container"`
}
type ContainerCreateArguments ¶
type ContainerCreateArguments struct {
Root string `json:"root"` //Root plist
Mount map[string]string `json:"mount"` //data disk mounts.
HostNetwork bool `json:"host_network"` //share host networking stack
Identity string `json:"identity"` //zerotier identity
Nics []*Nic `json:"nics"` //network setup (only respected if HostNetwork is false)
Port map[int]int `json:"port"` //port forwards (only if default networking is enabled)
Privileged bool `json:"privileged"` //Apply cgroups and capabilities limitations on the container
Hostname string `json:"hostname"` //hostname
Storage string `json:"storage"` //ardb storage needed for g8ufs mounts.
Name string `json:"name"` //for searching containers
Tags pm.Tags `json:"tags"` //for searching containers
Env map[string]string `json:"env"` //environment variables.
}
func (*ContainerCreateArguments) Validate ¶
func (c *ContainerCreateArguments) Validate() error
type ContainerFindArguments ¶
type ContainerFindArguments struct {
Tags []string `json:"tags"`
}
type ContainerInfo ¶
type ContainerInfo struct {
pm.ProcessStats
Container Container `json:"container"`
}
type ContainerManager ¶
type ContainerManager interface {
Dispatch(id uint16, cmd *pm.Command) (*pm.JobResult, error)
GetWithTags(tags ...string) []Container
GetOneWithTags(tags ...string) Container
Of(id uint16) Container
}
func ContainerSubsystem ¶
type Message ¶
type Message struct {
Type string `json:"type"`
Command string `json:"command"`
Payload json.RawMessage `json:"payload"`
}
type NetworkConfig ¶
type SortableDisks ¶
type SortableDisks []disk.PartitionStat
func (SortableDisks) Len ¶
func (d SortableDisks) Len() int
func (SortableDisks) Less ¶
func (d SortableDisks) Less(i, j int) bool
Less reports whether the element with index i should sort before the element with index j.
func (SortableDisks) Swap ¶
func (d SortableDisks) Swap(i, j int)
Swap swaps the elements with indexes i and j.
Click to show internal directories.
Click to hide internal directories.