offerUtils

package
v0.0.0-...-23875d4 Latest Latest
Warning

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

Go to latest
Published: May 31, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HostMismatch

func HostMismatch(offerHost string, taskHost string) bool

Is there a mismatch between the task's host requirement and the host corresponding to the offer.

func OfferAgg

func OfferAgg(offer *mesos.Offer) (float64, float64, float64)

func PowerClass

func PowerClass(offer *mesos.Offer) string

Determine the power class of the host in the offer.

func UpdateEnvironment

func UpdateEnvironment(offer *mesos.Offer)

If the host in the offer is a new host, add the host to the set of Hosts and register the powerclass of this host.

Types

type OffersSorter

type OffersSorter []*mesos.Offer

Implements the sort.Sort interface to sort Offers based on CPU. TODO: Have a generic sorter that sorts based on a defined requirement (CPU, RAM, DISK or Watts).

func (OffersSorter) Len

func (offersSorter OffersSorter) Len() int

func (OffersSorter) Less

func (offersSorter OffersSorter) Less(i, j int) bool

func (OffersSorter) Swap

func (offersSorter OffersSorter) Swap(i, j int)

Jump to

Keyboard shortcuts

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