Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatLimit ¶
func SetDefaults ¶
func SetDefaults(r *Resources)
Types ¶
type Spec ¶
type Spec struct { // Request, if set, is the amount of resource a job expects to consume, // so the job should only be placed on a host with at least this amount // of resource available, and once scheduled this amount of resource // should then be unavailable on the given host. Request *int64 `json:"request"` // Limit, if set, is an upper limit on the amount of resource a job can // consume, the outcome of hitting this limit being implementation // defined (e.g. a system error, throttling, catchable / uncatchable // signals etc.) Limit *int64 `json:"limit"` }
type Type ¶
type Type string
const ( // TypeMemory specifies the available memory in bytes inside a container. TypeMemory Type = "memory" // TypeCPU specifies the amount of milliCPU requested. A milliCPU is // conceptually 1/1000 of a CPU core (eg 500m is half of a CPU core). In // practice, a 1000 milliCPU limit is equivalent to 1024 CPU shares. TypeCPU Type = "cpu" // TypeMaxFD specifies a value one greater than the maximum file // descriptor number that can be opened inside a container. TypeMaxFD Type = "max_fd" // TypeMaxProcs specifies the maximum number of processes which can // be started inside a container. TypeMaxProcs Type = "max_procs" )
Click to show internal directories.
Click to hide internal directories.