Documentation ¶
Index ¶
- type AllNode
- type AndNode
- type HasNode
- type LabelContainsValueNode
- type LabelEndsWithValueNode
- type LabelEqValueNode
- type LabelInSetNode
- type LabelNeValueNode
- type LabelNotInSetNode
- type LabelStartsWithValueNode
- type Labels
- type MapAsLabels
- type NotNode
- type OrNode
- type PrefixVisitor
- type Selector
- type StringSet
- type Visitor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AndNode ¶
type AndNode struct {
Operands []node
}
func (*AndNode) AcceptVisitor ¶ added in v1.7.4
type HasNode ¶
type HasNode struct {
LabelName string
}
func (*HasNode) AcceptVisitor ¶ added in v1.7.4
type LabelContainsValueNode ¶ added in v1.7.4
func (*LabelContainsValueNode) AcceptVisitor ¶ added in v1.7.4
func (node *LabelContainsValueNode) AcceptVisitor(v Visitor)
func (*LabelContainsValueNode) Evaluate ¶ added in v1.7.4
func (node *LabelContainsValueNode) Evaluate(labels Labels) bool
type LabelEndsWithValueNode ¶ added in v1.7.4
func (*LabelEndsWithValueNode) AcceptVisitor ¶ added in v1.7.4
func (node *LabelEndsWithValueNode) AcceptVisitor(v Visitor)
func (*LabelEndsWithValueNode) Evaluate ¶ added in v1.7.4
func (node *LabelEndsWithValueNode) Evaluate(labels Labels) bool
type LabelEqValueNode ¶
func (*LabelEqValueNode) AcceptVisitor ¶ added in v1.7.4
func (node *LabelEqValueNode) AcceptVisitor(v Visitor)
func (*LabelEqValueNode) Evaluate ¶
func (node *LabelEqValueNode) Evaluate(labels Labels) bool
type LabelInSetNode ¶
func (*LabelInSetNode) AcceptVisitor ¶ added in v1.7.4
func (node *LabelInSetNode) AcceptVisitor(v Visitor)
func (*LabelInSetNode) Evaluate ¶
func (node *LabelInSetNode) Evaluate(labels Labels) bool
type LabelNeValueNode ¶
func (*LabelNeValueNode) AcceptVisitor ¶ added in v1.7.4
func (node *LabelNeValueNode) AcceptVisitor(v Visitor)
func (*LabelNeValueNode) Evaluate ¶
func (node *LabelNeValueNode) Evaluate(labels Labels) bool
type LabelNotInSetNode ¶
func (*LabelNotInSetNode) AcceptVisitor ¶ added in v1.7.4
func (node *LabelNotInSetNode) AcceptVisitor(v Visitor)
func (*LabelNotInSetNode) Evaluate ¶
func (node *LabelNotInSetNode) Evaluate(labels Labels) bool
type LabelStartsWithValueNode ¶ added in v1.7.4
func (*LabelStartsWithValueNode) AcceptVisitor ¶ added in v1.7.4
func (node *LabelStartsWithValueNode) AcceptVisitor(v Visitor)
func (*LabelStartsWithValueNode) Evaluate ¶ added in v1.7.4
func (node *LabelStartsWithValueNode) Evaluate(labels Labels) bool
type Labels ¶ added in v1.2.0
type Labels interface { // Get returns value and presence of the given labelName Get(labelName string) (value string, present bool) }
Labels defines the interface of labels that can be used by selector
type MapAsLabels ¶ added in v1.2.0
MapAsLabels allows you use map as labels
type PrefixVisitor ¶ added in v1.7.4
type PrefixVisitor struct {
Prefix string
}
PrefixVisitor implements the Visitor interface to allow prefixing of label names within a selector.
func (PrefixVisitor) Visit ¶ added in v1.7.4
func (v PrefixVisitor) Visit(n interface{})
type Selector ¶
type Selector interface { // Evaluate evaluates the selector against the given labels expressed as a concrete map. Evaluate(labels map[string]string) bool // EvaluateLabels evaluates the selector against the given labels expressed as an interface. // This allows for labels that are calculated on the fly. EvaluateLabels(labels Labels) bool // String returns a string that represents this selector. String() string // UniqueID returns the unique ID that represents this selector. UniqueID() string // AcceptVisitor allows an external visitor to modify this selector. AcceptVisitor(v Visitor) }
Selector represents a label selector.
Click to show internal directories.
Click to hide internal directories.