labels

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const ResourcePrefixSize = 8 +

	4 //resource
View Source
const StaticSize = ResourcePrefixSize +

	4 // prefix

Variables

View Source
var ErrKeyTooShort = errors.New("labels: Key too short")
View Source
var (
	ValueSep = []byte("=")
)

Functions

func Debug

func Debug(b []byte) string

Types

type Label

type Label struct {
	Namespace uint64
	Resource  v1.RESOURCE
	Prefix    v1.PREFIX
	Key       string
	Value     string
	// contains filtered or unexported fields
}

func NewLabel

func NewLabel() *Label

func (*Label) Decode

func (l *Label) Decode(data []byte) error

func (*Label) Encode

func (l *Label) Encode() []byte

func (*Label) Release

func (l *Label) Release()

func (*Label) Reset

func (l *Label) Reset() *Label

func (*Label) String

func (l *Label) String() string

func (*Label) WithKey

func (l *Label) WithKey(k string) *Label

func (*Label) WithNamespace

func (l *Label) WithNamespace(ns uint64) *Label

func (*Label) WithPrefix

func (l *Label) WithPrefix(p v1.PREFIX) *Label

func (*Label) WithResource

func (l *Label) WithResource(r v1.RESOURCE) *Label

func (*Label) WithValue

func (l *Label) WithValue(v string) *Label

type Labels

type Labels struct {
	// contains filtered or unexported fields
}

func (*Labels) Debug

func (l *Labels) Debug() string

func (*Labels) Iter

func (l *Labels) Iter(f func(lbl *Label) error) error

func (*Labels) New

func (l *Labels) New() *Label

func (*Labels) Reset

func (l *Labels) Reset()

Jump to

Keyboard shortcuts

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