Documentation ¶
Index ¶
- Variables
- func Merge(dst, src FlowLabels)
- type FlowLabelValue
- type FlowLabels
- 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) ToPlainMap() 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.
func NewFromPlainMap ¶
func NewFromPlainMap(input map[string]string) FlowLabels
NewFromPlainMap returns flow labels from normal map[string]string. Telemetry flag is set to true for all flow 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) ToPlainMap ¶
func (fl FlowLabels) ToPlainMap() map[string]string
ToPlainMap returns flow labels as normal map[string]string.