Documentation
¶
Index ¶
- func CmdToString(cmd HyperCmd) string
- type Capabilities
- type Constraints
- type DecodedMessage
- type EnvironmentVar
- type Exec
- type Fsmap
- type HyperCmd
- type IPAddress
- type KillContainer
- type NetIface
- type Network
- type NewContainer
- type Process
- type PsContainer
- type RemoveContainer
- type Route
- type StartPod
- type SystemMountsInfo
- type TtyMessage
- type Winsize
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CmdToString ¶
CmdToString translates a command into its corresponding string.
Types ¶
type Capabilities ¶
type Capabilities struct {
// Bounding is the set of capabilities checked by the kernel.
Bounding []string `json:"bounding"`
// Effective is the set of capabilities checked by the kernel.
Effective []string `json:"effective"`
// Inheritable is the capabilities preserved across execve.
Inheritable []string `json:"inheritable"`
// Permitted is the limiting superset for effective capabilities.
Permitted []string `json:"permitted"`
// Ambient is the ambient set of capabilities that are kept.
Ambient []string `json:"ambient"`
}
Capabilities specify the capabilities to keep when executing the process inside the container.
type Constraints ¶
type Constraints struct {
// CPUQuota specifies the total amount of time in microseconds
CPUQuota int64
// CPUPeriod specifies a period of time in microseconds
CPUPeriod uint64
CPUShares uint64
}
Constraints describes the constraints for a container
type DecodedMessage ¶
DecodedMessage describes messages going through CTL channel.
type EnvironmentVar ¶
EnvironmentVar describes an environment variable and its value.
type Fsmap ¶
type Fsmap struct {
Source string `json:"source"`
Path string `json:"path"`
AbsolutePath bool `json:"absolutePath"`
ReadOnly bool `json:"readOnly"`
DockerVolume bool `json:"dockerVolume"`
// SCSIAddr is the SCSI address in the format SCSI-id:LUN.
// If SCSIAddr is provided, we use that to determine the device name to be mounted
// ignoring the Source field that is used for as the source location for mounting otherwise.
SCSIAddr string `json:"scsiAddr,omitempty"`
}
Fsmap describes a filesystem map related to a container.
type HyperCmd ¶
type HyperCmd uint32
HyperCmd defines the command type.
const ( VersionCmd HyperCmd = iota StartPodCmd GetPodDeprecatedCmd StopPodDeprecatedCmd DestroyPodCmd RestartContainerDeprecatedCmd ExecCmd FinishCmdDeprecatedCmd ReadyCmd AckCmd ErrorCmd WinsizeCmd PingCmd FinishPodDeprecatedCmd NextCmd WriteFileCmd ReadFileCmd NewContainerCmd KillContainerCmd OnlineCPUMemCmd SetupInterfaceCmd SetupRouteCmd RemoveContainerCmd PsContainerCmd ProcessAsyncEventCmd )
Control command string IDs
type KillContainer ¶
type KillContainer struct {
ID string `json:"container"`
Signal syscall.Signal `json:"signal"`
AllProcesses bool `json:"allProcesses"`
}
KillContainer describes the format expected by a KILLCONTAINER command.
type NetIface ¶
type NetIface struct {
Name string `json:"newDeviceName"`
IPAddresses []IPAddress `json:"ipAddresses"`
MTU int `json:"mtu"`
HwAddr string `json:"macAddr"`
}
NetIface describes a pod network interface.
type Network ¶
type Network struct {
Interfaces []NetIface `json:"interfaces"`
DNS []string `json:"dns"`
Routes []Route `json:"routes"`
}
Network fully describes a pod network with its interfaces, routes and dns related information.
type NewContainer ¶
type NewContainer struct {
ID string `json:"id"`
RootFs string `json:"rootfs"`
Image string `json:"image"`
FsType string `json:"fstype,omitempty"`
Fsmap []Fsmap `json:"fsmap"`
Process Process `json:"process"`
SystemMountsInfo SystemMountsInfo `json:"systemMountsInfo"`
Constraints Constraints `json:"constraints"`
// SCSI address in the format SCSI-Id:LUN
SCSIAddr string `json:"scsiAddr,omitempty"`
}
NewContainer describes the format expected by a NEWCONTAINER command.
type Process ¶
type Process struct {
ID string `json:"id"`
User string `json:"user,omitempty"`
Group string `json:"group,omitempty"`
AdditionalGroups []string `json:"additionalGroups,omitempty"`
Terminal bool `json:"terminal"`
Stdio uint64 `json:"stdio"`
Stderr uint64 `json:"stderr"`
Args []string `json:"args"`
Envs []EnvironmentVar `json:"envs,omitempty"`
Workdir string `json:"workdir"`
NoNewPrivileges bool `json:"noNewPrivileges"`
Capabilities Capabilities `json:"capabilities"`
}
Process describes a process running on a container.
type PsContainer ¶
type PsContainer struct {
ID string `json:"container"`
Format string `json:"format"`
Args []string `json:"psargs"`
}
PsContainer describes the format expected by a PSCONTAINER command.
type RemoveContainer ¶
type RemoveContainer struct {
ID string `json:"container"`
}
RemoveContainer describes the format expected by a REMOVECONTAINER command.
type Route ¶
type Route struct {
Src string `json:"src"`
Dest string `json:"dest"`
Gateway string `json:"gateway,omitempty"`
Device string `json:"device,omitempty"`
}
Route describes a pod network route.
type StartPod ¶
type StartPod struct {
ID string `json:"hostname"`
Interfaces []NetIface `json:"interfaces,omitempty"`
DNS []string `json:"dns,omitempty"`
Routes []Route `json:"routes,omitempty"`
}
StartPod describes the format expected by a STARTPOD command.
type SystemMountsInfo ¶
type SystemMountsInfo struct {
// Indicates if /dev has been passed as a bind mount for the host /dev
BindMountDev bool `json:"bindMountDev"`
// Size of /dev/shm assigned on the host.
DevShmSize int `json:"devShmSize"`
}
SystemMountsInfo describes additional information for system mounts that the agent needs to handle
type TtyMessage ¶
TtyMessage describes messages going through IO channel.