Documentation ¶
Index ¶
- type BasePriority
- func (b *BasePriority) HostCandidate(c core.Candidater) (*candidate.HostDesc, error)
- func (b *BasePriority) Map(u *core.Unit, c core.Candidater) (core.HostPriority, error)
- func (b *BasePriority) Name() string
- func (b *BasePriority) PreExecute(u *core.Unit, cs []core.Candidater) (bool, []core.PredicateFailureReason, error)
- func (b *BasePriority) Reduce(u *core.Unit, cs []core.Candidater, result core.HostPriorityList) error
- type PriorityHelper
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 (b *BasePriority) Map(u *core.Unit, c core.Candidater) (core.HostPriority, error)
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)
Click to show internal directories.
Click to hide internal directories.