weighted

package
v0.0.0-...-a355528 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPlugin

func NewPlugin(plugins func() discovery.Plugins, choices selector.Options) instance.Plugin

NewPlugin returns an instance plugin that implements this algorithm

func SelectOne

func SelectOne(spec instance.Spec, choices []selector.Choice,
	lookup func(selector.Choice) instance.Plugin) (match selector.Choice, err error)

SelectOne selects one of the choices given choices and a context (the spec). It can optionally use the lookup to perform queries on the instance plugin to arrive at a decision

Types

type AffinityArgs

type AffinityArgs struct {
	Weight uint
}

AffinityArgs contains the arguments specific to this affinity algorithm. It's in the Args field of selector.Affinity

Jump to

Keyboard shortcuts

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