Documentation ¶
Index ¶
Constants ¶
View Source
const ( // a selector label takes precedance over any other label when matching RuleIncludeLabel = "konveyor.io/include" SelectAlways = "always" SelectNever = "never" )
View Source
const ( LabelValueFmt = "^[a-zA-Z0-9]([-a-zA-Z0-9. ]*[a-zA-Z0-9+-])?$" LabelPrefixFmt = "^(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?$" )
Variables ¶
This section is empty.
Functions ¶
func ParseLabel ¶
ParseLabel given a string label converts into key=val
Types ¶
type LabelSelector ¶
type LabelSelector[T Labeled] struct { // contains filtered or unexported fields }
func NewLabelSelector ¶
func NewLabelSelector[T Labeled](expr string, match MatchAny) (*LabelSelector[T], error)
NewRuleSelector returns a new rule selector that works on rule labels it enables using string expressions to form complex label queries supports "&&", "||" and "!" operators, "(" ")" for grouping, operands are string labels in key=val format, keys can be subdomain prefixed
func (*LabelSelector[T]) MatchList ¶
func (l *LabelSelector[T]) MatchList(list []T) ([]T, error)
func (*LabelSelector[T]) Matches ¶
func (l *LabelSelector[T]) Matches(v T) (bool, error)
Click to show internal directories.
Click to hide internal directories.