Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPerHostResourceAvailability ¶
func GetPerHostResourceAvailability() map[string]*ResourceCount
Retrieve resource availability for each host in the cluster.
func RecordTotalResourceAvailability ¶
Determine the total available resources from the first round of mesos resource offers.
Types ¶
type PairList ¶
type PairList []Pair
A slice of pairs that implements the sort.Interface to sort by value.
func GetPairList ¶
Convert map[string]float64 to PairList.
type ResourceCount ¶
type ResourceCount struct { // Total resources available. TotalCPU float64 TotalRAM float64 TotalWatts float64 // Resources currently unused. UnusedCPU float64 UnusedRAM float64 UnusedWatts float64 }
Maintain information regarding the usage of the cluster resources. This information is maintained for each node in the cluster.
func GetClusterwideResourceAvailability ¶
func GetClusterwideResourceAvailability() ResourceCount
Retrieve clusterwide resource availability.
func (*ResourceCount) DecrUnusedResources ¶
func (rc *ResourceCount) DecrUnusedResources(tr def.TaskResources)
Decrement unused resources.
func (*ResourceCount) IncrUnusedResources ¶
func (rc *ResourceCount) IncrUnusedResources(tr def.TaskResources)
Increment unused resources.
type TrackResourceUsage ¶
Click to show internal directories.
Click to hide internal directories.