istio: istio.io/istio/pkg/config/labels Index | Files

package labels

import "istio.io/istio/pkg/config/labels"

Index

Package Files

collection.go instance.go

Constants

const (
    DNS1123LabelMaxLength = 63 // Public for testing only.

)

func IsDNS1123Label Uses

func IsDNS1123Label(value string) bool

IsDNS1123Label tests for a string that conforms to the definition of a label in DNS (RFC 1123).

func IsWildcardDNS1123Label Uses

func IsWildcardDNS1123Label(value string) bool

IsWildcardDNS1123Label tests for a string that conforms to the definition of a label in DNS (RFC 1123), but allows the wildcard label (`*`), and typical labels with a leading astrisk instead of alphabetic character (e.g. "*-foo")

type Collection Uses

type Collection []Instance

Collection is a collection of labels used for comparing labels against a collection of labels

func (Collection) HasSubsetOf Uses

func (c Collection) HasSubsetOf(that Instance) bool

HasSubsetOf returns true if the input labels are a super set of one labels in a collection or if the tag collection is empty

func (Collection) IsSupersetOf Uses

func (c Collection) IsSupersetOf(that Instance) bool

IsSupersetOf returns true if the input labels are a subset set of any set of labels in a collection

type Instance Uses

type Instance map[string]string

Instance is a non empty map of arbitrary strings. Each version of a service can be differentiated by a unique set of labels associated with the version. These labels are assigned to all instances of a particular service version. For example, lets say catalog.mystore.com has 2 versions v1 and v2. v1 instances could have labels gitCommit=aeiou234, region=us-east, while v2 instances could have labels name=kittyCat,region=us-east.

func Parse Uses

func Parse(s string) Instance

Parse labels from a comma-separated string of the form k1=v1,k2=v2,...,kn=vn.

func (Instance) Equals Uses

func (i Instance) Equals(that Instance) bool

Equals returns true if the labels are identical

func (Instance) String Uses

func (i Instance) String() string

func (Instance) SubsetOf Uses

func (i Instance) SubsetOf(that Instance) bool

SubsetOf is true if the label has identical values for the keys

func (Instance) Validate Uses

func (i Instance) Validate() error

Validate ensures tag is well-formed

Package labels imports 6 packages (graph) and is imported by 34 packages. Updated 2019-09-13. Refresh now. Tools for package owners.