labelsutil

package
v3.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2018 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

type Filter interface {
	Matches(labels map[string]string) (bool, error)
}

Filter defines the Label filter interface

func CreateFilter

func CreateFilter(filter string) (Filter, error)

CreateFilter creates a Filter from a given input string

type Warning

type Warning error

A Warning is an error during the matching process. But it doesn't have the standard Go error semantic as it should be reported but not stop any process. It basically means that the label set doesn't match but for an unexpected reason.

func MatchesAll

func MatchesAll(labels map[string]string, filters ...Filter) (bool, Warning)

MatchesAll checks if all of the given filters match a set of labels

Providing no filters is not considered as an error and will return true.

Directories

Path Synopsis
Package internal should be considered as an internal subpackage of labelsutil.
Package internal should be considered as an internal subpackage of labelsutil.

Jump to

Keyboard shortcuts

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