Documentation ¶
Index ¶
- Constants
- func AddHostToIndex(id int, offerIndex map[string]summary.HostSummary, ...)
- func CleanUpRanker()
- func CreateOffer(hostName string, resource scalar.Resources) *mesos.Offer
- func CreateOfferIndex(processor watchevent.WatchProcessor) map[string]summary.HostSummary
- func Init(cqosClient cqos.QoSAdvisorServiceYARPCClient, metrics *metrics.Metrics)
- type Ranker
Constants ¶
View Source
const ( // DeFrag is the name for the de-fragmentation policy DeFrag = "DEFRAG" // FirstFit is the name of the First Fit policy FirstFit = "FIRST_FIT" // LoadAware is the name of the Load Aware policy LoadAware = "LOAD_AWARE" )
Variables ¶
This section is empty.
Functions ¶
func AddHostToIndex ¶
func AddHostToIndex(id int, offerIndex map[string]summary.HostSummary, processor watchevent.WatchProcessor)
func CreateOfferIndex ¶
func CreateOfferIndex(processor watchevent.WatchProcessor) map[string]summary.HostSummary
Types ¶
type Ranker ¶
type Ranker interface { // Returns the name of the ranker implementation Name() string // returns the list of ranked ordered list GetRankedHostList( ctx context.Context, offerIndex map[string]summary.HostSummary, ) []interface{} // Refreshes the ranker based on new host summary index // we need to call this asynchronously to mitigate the // performance penalty of bin packing. RefreshRanking( ctx context.Context, offerIndex map[string]summary.HostSummary, ) }
Ranker is the interface for ranking strategy for ranking the host it returns the list of ordered list of hosts summary. Caller of the interface would get the list of ordered host summary and then match the host from 0->n to match the constraints with offer.
func GetRankerByName ¶
GetRankerByName returns a ranker with specified name
func NewFirstFitRanker ¶
func NewFirstFitRanker() Ranker
NewFirstFitRanker returns the first fit ranker object
func NewLoadAwareRanker ¶
func NewLoadAwareRanker( cqosClient cqos.QoSAdvisorServiceYARPCClient, cqosMetrics *metrics.Metrics) Ranker
NewLoadAwareRanker returns the LoadAware Ranker
Click to show internal directories.
Click to hide internal directories.