label

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2021 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package label contains function managing labels and selectors.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SplitSelectors

func SplitSelectors(s string) []string

Types

type Claims

type Claims map[string][]string

Claims provide consumers the ability to signal cache availability to job-manager.

func ParseClaims

func ParseClaims(claims []string) (Claims, error)

func (Claims) Format

func (c Claims) Format() []string

func (Claims) Match

func (c Claims) Match(other Claims) bool

type Labels

type Labels map[string]string

func ParseStringArray

func ParseStringArray(labels []string) (Labels, error)

func (Labels) Equals

func (l Labels) Equals(other Labels) bool

func (Labels) String

func (l Labels) String() string

type Selectors

type Selectors struct {
	Names    []string            `json:"names,omitempty"`
	NotNames []string            `json:"not_names,omitempty"`
	In       map[string][]string `json:"in,omitempty"`
	NotIn    map[string][]string `json:"not_in,omitempty"`
}

func ParseSelectorStringArray

func ParseSelectorStringArray(sels []string) (*Selectors, error)

func ParseSelectors

func ParseSelectors(s string) (*Selectors, error)

func (*Selectors) CacheKey

func (s *Selectors) CacheKey() string

CacheKey returns a string that can be used as a cache key for the selector values.

func (*Selectors) InclusiveKeys

func (s *Selectors) InclusiveKeys() []string

func (*Selectors) Len

func (s *Selectors) Len() int

func (*Selectors) Match

func (s *Selectors) Match(labels Labels) bool

func (*Selectors) String

func (s *Selectors) String() string

Jump to

Keyboard shortcuts

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