Documentation ¶
Index ¶
- Variables
- func Merge(dst, src FlowLabels)
- type FlowLabelValue
- type FlowLabels
- func (fl FlowLabels) Copy() labels.PlainMap
- func (fl FlowLabels) Get(key string) (string, bool)
- func (fl FlowLabels) GetBool(key string) (bool, error)
- func (fl FlowLabels) GetFloat64(key string) (float64, error)
- func (fl FlowLabels) GetInt64(key string) (int64, error)
- func (fl FlowLabels) GetString(key string) (string, error)
- func (fl FlowLabels) GetUint64(key string) (uint64, error)
- func (fl FlowLabels) SortedKeys() []string
- func (fl FlowLabels) TelemetryLabels() map[string]string
Constants ¶
This section is empty.
Variables ¶
var ErrLabelNotFound = errors.New("label not found")
ErrLabelNotFound is returned when a flow label is not found.
Functions ¶
func Merge ¶
func Merge(dst, src FlowLabels)
Merge combines two flow labels maps into one. Overwrites overlapping keys with values from src.
Types ¶
type FlowLabelValue ¶
FlowLabelValue is a value of a flow label with additional metadata.
type FlowLabels ¶
type FlowLabels map[string]FlowLabelValue
FlowLabels is a map from flow labels to their values. Each value also stores some metadata.
FlowLabels implement labels.Labels to avoid conversion to plain map.
func (FlowLabels) Copy ¶ added in v2.7.0
func (fl FlowLabels) Copy() labels.PlainMap
Copy implements labels.Labels.
func (FlowLabels) Get ¶ added in v2.7.0
func (fl FlowLabels) Get(key string) (string, bool)
Get implements labels.Labels.
func (FlowLabels) GetBool ¶
func (fl FlowLabels) GetBool(key string) (bool, error)
GetBool returns the bool value of a flow label with the given key. If the key is not found in the FlowLabels, it returns an error.
func (FlowLabels) GetFloat64 ¶
func (fl FlowLabels) GetFloat64(key string) (float64, error)
GetFloat64 returns the float64 value of a flow label with the given key. If the key is not found in the FlowLabels, it returns an error.
func (FlowLabels) GetInt64 ¶
func (fl FlowLabels) GetInt64(key string) (int64, error)
GetInt64 returns the int64 value of a flow label with the given key. If the key is not found in the FlowLabels, it returns an error.
func (FlowLabels) GetString ¶
func (fl FlowLabels) GetString(key string) (string, error)
GetString returns the string value of a flow label with the given key. If the key is not found in the FlowLabels, it returns an error.
func (FlowLabels) GetUint64 ¶
func (fl FlowLabels) GetUint64(key string) (uint64, error)
GetUint64 returns uint64 value of a flow label.
func (FlowLabels) SortedKeys ¶ added in v2.7.0
func (fl FlowLabels) SortedKeys() []string
SortedKeys implements labels.Labels.
func (FlowLabels) TelemetryLabels ¶ added in v2.7.0
func (fl FlowLabels) TelemetryLabels() map[string]string
TelemetryLabels returns only labels that have Telemetry flag set.