Documentation ¶
Index ¶
- Constants
- func YKContainer(container uint8, subkey uint8) uint32
- func YKExec(exec uint8, subkey uint8) uint32
- type BindMount
- type ConfigMount
- type Container
- type ControlMessageExec
- type ControlMessageResize
- type ControlMessageSignal
- type ControlMessageState
- type Cradle
- type Firmware
- type Image
- type Kernel
- type Launch
- type Layer
- type Lifecycle
- type Machine
- type Network
- type Pod
- type Process
- type Role
- type Volume
- type VolumeMount
Constants ¶
View Source
const STATE_CREATED = 0
View Source
const STATE_DEAD = 4
View Source
const STATE_EXITED = 2
View Source
const STATE_RESTARTING = 3
View Source
const STATE_RUNNING = 1
View Source
const YC_KEY_CONTAINER_END = 0x1ffff
View Source
const YC_KEY_CONTAINER_START = 0x10000
View Source
const YC_KEY_EXEC_END = 0x2ffff
View Source
const YC_KEY_EXEC_START = 0x20000
View Source
const YC_KEY_SHUTDOWN = 0x104
View Source
const YC_KEY_STARTUP = 0x101
View Source
const YC_SUB_CLOSE_STDERR = 0x13
View Source
const YC_SUB_CLOSE_STDIN = 0x11
View Source
const YC_SUB_CLOSE_STDOUT = 0x12
View Source
const YC_SUB_EXEC = 0x5
View Source
const YC_SUB_SIGNAL = 0x6
View Source
const YC_SUB_STATE = 0x6
View Source
const YC_SUB_STDERR = 0x3
View Source
const YC_SUB_STDIN = 0x1
View Source
const YC_SUB_STDOUT = 0x2
View Source
const YC_SUB_WINCH = 0x4
Variables ¶
This section is empty.
Functions ¶
func YKContainer ¶
Types ¶
type ConfigMount ¶
type Container ¶
type Container struct { // uuid ID string `json:"id"` // api name Name string `json:"name"` // hostname inside container Hostname string `json:"hostname"` // image config Image Image `json:"image"` // main process config Process Process `json:"process"` // lifecycle of container Lifecycle Lifecycle `json:"lifecycle"` // mount volumes VolumeMounts []VolumeMount `json:"block_volume_mounts,omitempty"` // mount cradle host paths into container BindMounts []BindMount `json:"bind_mounts,omitempty"` // k8s config objects ConfigMounts []ConfigMount `json:"config_mounts,omitempty"` }
the container spec
type ControlMessageExec ¶
type ControlMessageResize ¶
type ControlMessageSignal ¶
type ControlMessageSignal struct {
Signal int32 `json:"sig"`
}
type ControlMessageState ¶
type ControlMessageState struct { StateNum uint8 `json:"statenum"` Code int32 `json:"code"` Error string `json:"error"` }
func (*ControlMessageState) StateString ¶
func (s *ControlMessageState) StateString() string
type Launch ¶
type Launch struct { // version of spec. currently 2 Version int `json:"version"` // uuid of pod ID string `json:"id"` Pod *Pod `json:"pod,omitempty"` Network *Network `json:"network,omitempty"` Role *Role `json:"role,omitempty"` }
the interior launch spec
type Lifecycle ¶
type Lifecycle struct { // should container restart with exit code 0 RestartOnSuccess bool `json:"restart_on_success"` // should container restart with exit code != 0 RestartOnFailure bool `json:"restart_on_failure"` // delay restarts by this amount of milliseconds RestartDelay uint64 `json:"restart_delay"` // give up after starting this many times. // note that the first start counts too // 1 means never restart after initial launch // 0 means infinite MaxRestarts int `json:"max_restarts"` // fail entire pod when maxrestarts is reached Critical bool `json:"critical"` }
type Network ¶
type Network struct { Nameservers []string `json:"nameservers,omitempty"` FabricIp6 string `json:"fip6,omitempty"` FabricGw6 string `json:"fgw6,omitempty"` TransitIp4 string `json:"tip4,omitempty"` TransitGw4 string `json:"tgw4,omitempty"` TransitIp6 string `json:"tip6,omitempty"` TransitGw6 string `json:"tgw6,omitempty"` PublicIPs []string `json:"public_ips,omitempty"` }
type Pod ¶
type Pod struct { // api name of pod Name string `json:"name"` // api namespace of pod Namespace string `json:"namespace"` // block volumes provided by the hypervisor Volumes []Volume `json:"block_volumes,omitempty"` // the containers inside the pod Containers []Container `json:"containers,omitempty"` }
pod to be launched in cradle
type Volume ¶
type Volume struct { // uuid of block volume ID string `json:"id"` // name referenced inside container Name string `json:"name"` // storage class Class string `json:"class"` // hvm transport mode Transport string `json:"transport"` // local storage pool Filesystem string `json:"filesystem"` // expected size in bytes Size uint64 `json:"size"` }
a volume provided by the hypervisor
Click to show internal directories.
Click to hide internal directories.