key

package
v1.16.4 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MetadataKeyBackendKey is the key used to store the backend key.
	MetadataKeyBackendKey = iota
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GlobalIdentity

type GlobalIdentity struct {
	labels.LabelArray
	// contains filtered or unexported fields
}

GlobalIdentity is the structure used to store an identity

func GetCIDKeyFromLabels added in v1.16.0

func GetCIDKeyFromLabels(allLabels map[string]string, source string) *GlobalIdentity

func (*GlobalIdentity) GetAsMap

func (gi *GlobalIdentity) GetAsMap() map[string]string

GetAsMap encodes a GlobalIdentity a map of keys to values. The keys will include a source delimted by a ':'. This output is pareable by PutKeyFromMap.

func (*GlobalIdentity) GetKey

func (gi *GlobalIdentity) GetKey() string

GetKey encodes an Identity as string

func (*GlobalIdentity) PutKey

PutKey decodes an Identity from its string representation

func (*GlobalIdentity) PutKeyFromMap

func (gi *GlobalIdentity) PutKeyFromMap(v map[string]string) allocator.AllocatorKey

PutKeyFromMap decodes an Identity from a map of key to value. Output from GetAsMap can be parsed. Note: NewLabelArrayFromMap will parse the ':' separated label source from the keys because the source parameter is ""

func (*GlobalIdentity) PutValue added in v1.14.4

func (gi *GlobalIdentity) PutValue(key, value any) allocator.AllocatorKey

PutValue puts metadata inside the global identity for the given 'key' with the given 'value'.

func (*GlobalIdentity) Value added in v1.14.4

func (gi *GlobalIdentity) Value(key any) any

Value returns the value stored in the metadata map.

Jump to

Keyboard shortcuts

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