promotionrule

package
v0.14.4 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: Apache-2.0 Imports: 1 Imported by: 2

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. It maps to promotion_rule column in candidate_database_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