Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidAlgorithm error for invalid algorithm input ErrInvalidAlgorithm = fmt.Errorf("invalid Algorithm") )
Functions ¶
This section is empty.
Types ¶
type IAlgoImpl ¶
type IAlgoImpl interface { // GetNode method returns the selected node for scheduling GetNode(nodebindings []*nodebinding.Model, nodes map[string]*node.Model) (*node.Model, error) }
IAlgoImpl defines interface for scheduling algorithm implementations
func GetAlgorithmImpl ¶
GetAlgorithmImpl is a factory method which returns the required impl of the algorithm
type IScheduler ¶
type IScheduler interface { // Schedule implemented by Scheduler based on current subscription and current load on nodes Schedule(*subscription.Model, int, []*nodebinding.Model, map[string]*node.Model) (*nodebinding.Model, error) }
IScheduler is the interface implemented by Schedulers
type LoadBalanceAlgoImpl ¶
type LoadBalanceAlgoImpl struct { }
LoadBalanceAlgoImpl implements load based scheduler algorithm
type NodeCountList ¶
type NodeCountList []NodeCount
NodeCountList represents array of NodeCount
func (NodeCountList) Len ¶
func (p NodeCountList) Len() int
func (NodeCountList) Less ¶
func (p NodeCountList) Less(i, j int) bool
func (NodeCountList) Swap ¶
func (p NodeCountList) Swap(i, j int)
type RandomAlgoImpl ¶
type RandomAlgoImpl struct { }
RandomAlgoImpl implements a random scheduling algorithm
type Scheduler ¶
type Scheduler struct { Algorithm Algorithm // contains filtered or unexported fields }
Scheduler struct for subsciption scheduling on worker nodes
func (*Scheduler) Schedule ¶
func (s *Scheduler) Schedule(sub *subscription.Model, partition int, nbs []*nodebinding.Model, nodes map[string]*node.Model) (*nodebinding.Model, error)
Schedule schedules a subsciption on a node and returns a nodebinding model
Click to show internal directories.
Click to hide internal directories.