filter

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2019 License: MIT Imports: 4 Imported by: 5 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FiltersEqual

func FiltersEqual(f1, f2 Filter) bool

Types

type ComparableFilter

type ComparableFilter interface {
	Filter
	Equals(Filter) bool
}

func All

func All() ComparableFilter

All() returns a filter whose Accept() is always false.

func And

func And(children ...Filter) ComparableFilter

func LabelSelector

func LabelSelector(ls *metav1.LabelSelector) ComparableFilter

func Labels

func Labels(match map[string]string) ComparableFilter

Labels() returns a filter which returns true if the provided map is a subset of the object's labels.

func NSName

func NSName(ids ...nsname.NSName) ComparableFilter

NSName() returns a filter whose Accept() returns true if the object's namespace and name matches one of the given NSNames.

func Not

func Not(child Filter) ComparableFilter

func Null

func Null() ComparableFilter

Null() returns a filter whose Accept() is always true.

func Or

func Or(children ...Filter) ComparableFilter

func Selector

func Selector(selector labels.Selector) ComparableFilter

type Filter

type Filter interface {

	// Accept() should return true if the given object passes the filter.
	Accept(metav1.Object) bool
}

func FN

func FN(fn func(metav1.Object) bool) Filter

Jump to

Keyboard shortcuts

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