Documentation ¶
Index ¶
Constants ¶
View Source
const ( // TODO(jonboulle): make these configurable HostCores = 100 HostMemory = 256 HostDisk = 0 )
Variables ¶
View Source
var HostResources = ResourceTuple{ HostCores, HostMemory, HostDisk, }
HostResources represents a set of resources that fleet considers reserved for the host, i.e. outside of any units it is running
Functions ¶
This section is empty.
Types ¶
type ResourceTuple ¶
type ResourceTuple struct { // in hundreds, ie 100=1core, 50=0.5core, 200=2cores, etc Cores int // in MB Memory int // in MB Disk int }
ResourceTuple groups together CPU, memory and disk space. This could be total, available or consumed. It could also be used by job resource requirements.
func Sub ¶
func Sub(r1, r2 ResourceTuple) (res ResourceTuple)
Sub returns a ResourceTuple representing the difference between two ResourceTuples
func Sum ¶
func Sum(resources ...ResourceTuple) (res ResourceTuple)
Sum aggregates a number of ResourceTuples into a single entity
func (ResourceTuple) Empty ¶
func (rt ResourceTuple) Empty() bool
Empty returns true if all components of the ResourceTuple are zero.
Click to show internal directories.
Click to hide internal directories.