Documentation ¶
Overview ¶
Package resource contains the Mesos scheduler specific resource functions
Index ¶
Constants ¶
const ( DefaultDefaultContainerCPULimit = CPUShares(0.25) // CPUs allocated for pods without CPU limit DefaultDefaultContainerMemLimit = MegaBytes(64.0) // memory allocated for pods without memory limit )
Variables ¶
This section is empty.
Functions ¶
func LimitPodCPU ¶
limitPodCPU sets DefaultContainerCPUs for the CPU limit of each container that does not limit its CPU resource yet. limitPodCPU returns true if and only if at least one container had no CPU limit set.
Types ¶
type CPUShares ¶
type CPUShares float64
func CPUForPod ¶
CPUForPod computes the limits from the spec plus the default CPU limit for unlimited containers
func PodCPULimit ¶
CPUFromPodSpec computes the cpu shares that the pod is admitted to use. Containers without CPU limit are NOT taken into account.
type MegaBytes ¶
type MegaBytes float64
func MemForPod ¶
MemForPod computes the limits from the spec plus the default memory limit for unlimited containers
func PodMemLimit ¶
MemFromPodSpec computes the amount of memory that the pod is admitted to use. Containers without memory limit are NOT taken into account.