metadata

package
v0.195.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: MIT Imports: 1 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metadata

type Metadata map[string][]interface{}

Metadata is made as a standalone package to avoid import cycle: influxd -> flux -> flux/interpreter -> flux/execute -> flux

func (Metadata) Add

func (md Metadata) Add(key string, value interface{})

func (Metadata) AddAll

func (md Metadata) AddAll(other Metadata)

func (Metadata) Del

func (md Metadata) Del(key string)

func (Metadata) Get added in v0.149.0

func (md Metadata) Get(key string) (interface{}, bool)

func (Metadata) GetAll added in v0.149.0

func (md Metadata) GetAll(key string) []interface{}

func (Metadata) Range

func (md Metadata) Range(fn func(key string, value interface{}) bool)

Range will iterate over the Metadata. It will invoke the function for each key/value pair. If there are multiple values for a single key, then this will be called with the same key once for each value.

type SyncMetadata added in v0.184.0

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

SyncMetadata is a version of `Metadata` which allows concurrent modifications to it

func NewSyncMetadata added in v0.184.0

func NewSyncMetadata() *SyncMetadata

func NewSyncMetadataWith added in v0.184.0

func NewSyncMetadataWith(meta Metadata) *SyncMetadata

func (*SyncMetadata) Add added in v0.184.0

func (md *SyncMetadata) Add(key string, value interface{})

func (*SyncMetadata) AddAll added in v0.184.0

func (md *SyncMetadata) AddAll(other Metadata)

func (*SyncMetadata) Del added in v0.184.0

func (md *SyncMetadata) Del(key string)

func (*SyncMetadata) Get added in v0.184.0

func (md *SyncMetadata) Get(key string) (interface{}, bool)

func (*SyncMetadata) GetAll added in v0.184.0

func (md *SyncMetadata) GetAll(key string) []interface{}

func (*SyncMetadata) Range added in v0.184.0

func (md *SyncMetadata) Range(fn func(key string, value interface{}) bool)

Range will iterate over the SyncMetadata. It will invoke the function for each key/value pair. If there are multiple values for a single key, then this will be called with the same key once for each value.

func (*SyncMetadata) ReadView added in v0.184.0

func (md *SyncMetadata) ReadView(fn func(meta Metadata))

ReadView provides read access to the underlying `Metadata` map. Since the map may be concurrently modified outside of the closure it should not be allowed to escape it.

func (*SyncMetadata) ReadWriteView added in v0.189.0

func (md *SyncMetadata) ReadWriteView(fn func(meta *Metadata))

Jump to

Keyboard shortcuts

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