labels

package
v0.20.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2019 License: Apache-2.0 Imports: 3 Imported by: 42

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MatchType

type MatchType int

MatchType is an enum for label matching types.

const (
	MatchEqual MatchType = iota
	MatchNotEqual
	MatchRegexp
	MatchNotRegexp
)

Possible MatchTypes.

func (MatchType) String

func (m MatchType) String() string

type Matcher

type Matcher struct {
	Type  MatchType
	Name  string
	Value string
	// contains filtered or unexported fields
}

Matcher models the matching of a label.

func NewMatcher

func NewMatcher(t MatchType, n, v string) (*Matcher, error)

NewMatcher returns a matcher object.

func ParseMatcher

func ParseMatcher(s string) (*Matcher, error)

func ParseMatchers

func ParseMatchers(s string) ([]*Matcher, error)

func (*Matcher) Matches

func (m *Matcher) Matches(s string) bool

Matches returns whether the matcher matches the given string value.

func (*Matcher) String

func (m *Matcher) String() string

Jump to

Keyboard shortcuts

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