selector

package
v0.3.1-build.1 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Matches

func Matches(req v1alpha1.FieldSelectorRequirement, context interface{}) (bool, error)

Types

type MatchError

type MatchError interface {
	error
	SelectorIndex() int
}

func BestSelectorMatchIndices

func BestSelectorMatchIndices(selectable Selectable, selectors []v1alpha1.Selector) ([]int, MatchError)

BestSelectorMatchIndices returns a slice of indices into the passed in `selectors` which match the `selectable` with the most specificity. Any error processing a selector includes the index of the offending Selector.

type Selectable

type Selectable interface {
	GetLabels() map[string]string
}

Jump to

Keyboard shortcuts

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