spec

package
v2.4.4+incompatible Latest Latest
Warning

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

Go to latest
Published: May 11, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseRuntime

type BaseRuntime struct {
	Healthst  HealthState
	State     RunState
	OOMkilled bool
	LastError string
	UpdatedAt time.Time
}

type CloudVolumeSpec

type CloudVolumeSpec struct {
	Type string
	Dirs []string
}

type Container

type Container struct {
	// FIXME(mijia): multiple ports supporing, will have multiple entries of <NodePort, ContainerPort, Protocol>
	Id            string
	Runtime       adoc.ContainerDetail
	NodeName      string
	NodeIp        string
	ContainerIp   string
	NodePort      int
	ContainerPort int
	Protocol      string
}

type ContainerSpec

type ContainerSpec struct {
	ImSpec
	Image         string
	Env           []string
	User          string
	WorkingDir    string
	DnsSearch     []string
	Volumes       []string // a stateful flag
	SystemVolumes []string // not a stateful flag, every node has system volumes
	CloudVolumes  []CloudVolumeSpec
	Command       []string
	Entrypoint    []string
	CpuLimit      int
	MemoryLimit   int64
	Expose        int
	LogConfig     adoc.LogConfig
}

type Dependency

type Dependency struct {
	PodName string
	Policy  DependencyPolicy
}

type DependencyPolicy

type DependencyPolicy int

type ExpectState

type ExpectState int

type HealthCnfOptions

type HealthCnfOptions struct {
	Interval int `json:"interval"`
	Timeout  int `json:"timeout"`
	Retries  int `json:"retries"`
}

type HealthConfig

type HealthConfig struct {
	Cmd     string           `json:"cmd"`
	Options HealthCnfOptions `json:"options"`
}

type HealthState

type HealthState int

type ImRuntime

type ImRuntime struct {
	BaseRuntime
	TargetState  ExpectState
	DriftCount   int
	RestartCount int
	RestartAt    time.Time
}

type ImSpec

type ImSpec struct {
	Name      string
	Namespace string
	Version   int
	CreatedAt time.Time
	UpdatedAt time.Time
}

type Pod

type Pod struct {
	InstanceNo int
	Containers []Container
	ImRuntime
}

type PodGroup

type PodGroup struct {
	Pods []Pod
	BaseRuntime
}

type PodGroupSpec

type PodGroupSpec struct {
	ImSpec
	Pod           PodSpec
	NumInstances  int
	RestartPolicy RestartPolicy
}

type PodGroupWithSpec

type PodGroupWithSpec struct {
	Spec      PodGroupSpec
	PrevState []PodPrevState
	PodGroup
}

type PodPrevState

type PodPrevState struct {
	NodeName string
	IPs      []string
}

type PodSpec

type PodSpec struct {
	ImSpec
	Network      string
	Containers   []ContainerSpec
	Filters      []string // for cluster scheduling
	Labels       map[string]string
	Dependencies []Dependency
	Annotation   string
	Stateful     bool
	SetupTime    int
	KillTimeout  int
	PrevState    PodPrevState
	HealthConfig HealthConfig
}

type RestartPolicy

type RestartPolicy int

type RunState

type RunState int

type SharedPodWithSpec

type SharedPodWithSpec struct {
	RefCount   int
	VerifyTime time.Time
	Spec       PodSpec
	Pod        Pod
}

Jump to

Keyboard shortcuts

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