promotionrule

package
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CandidatePromotionRule

type CandidatePromotionRule string

CandidatePromotionRule describe the promotion preference/rule for an instance.

const (
	Must      CandidatePromotionRule = "must"
	Prefer    CandidatePromotionRule = "prefer"
	Neutral   CandidatePromotionRule = "neutral"
	PreferNot CandidatePromotionRule = "prefer_not"
	MustNot   CandidatePromotionRule = "must_not"
)

func AllPromotionRules added in v0.14.0

func AllPromotionRules() []CandidatePromotionRule

AllPromotionRules returns all the CandidatePromotionRules in a list sorted by their priority.

func Parse

func Parse(ruleName string) (CandidatePromotionRule, error)

Parse returns a CandidatePromotionRule by name. It returns an error if there is no known rule by the given name.

func (*CandidatePromotionRule) BetterThan

func (this *CandidatePromotionRule) BetterThan(other CandidatePromotionRule) bool

Jump to

Keyboard shortcuts

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