priorities

package
v2.3.20181123+incompat... Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasePriority

type BasePriority struct {
}

BasePriority is a default struct for priority that all the priorities will contain it and implement its PreExecute(),Map(),Reduce() and Name() methods.

func (*BasePriority) HostCandidate

func (b *BasePriority) HostCandidate(c core.Candidater) (*candidate.HostDesc, error)

func (*BasePriority) Map

func (*BasePriority) Name

func (b *BasePriority) Name() string

func (*BasePriority) PreExecute

func (b *BasePriority) PreExecute(u *core.Unit, cs []core.Candidater) (bool, []core.PredicateFailureReason, error)

func (*BasePriority) Reduce

func (b *BasePriority) Reduce(u *core.Unit, cs []core.Candidater, result core.HostPriorityList) error

type PriorityHelper

type PriorityHelper struct {
	Candidate core.Candidater
	// contains filtered or unexported fields
}

PriorityHelper is a struct that as a base interface for all priorities.

func NewPriorityHelper

func NewPriorityHelper(p core.Priority, u *core.Unit, c core.Candidater) *PriorityHelper

func (*PriorityHelper) GetResult

func (h *PriorityHelper) GetResult() (core.HostPriority, error)

func (*PriorityHelper) SetError

func (h *PriorityHelper) SetError(err error)

func (*PriorityHelper) SetScore

func (h *PriorityHelper) SetScore(score int)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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