Documentation ¶
Index ¶
- type Metadata
- func (md Metadata) Add(key string, value interface{})
- func (md Metadata) AddAll(other Metadata)
- func (md Metadata) Del(key string)
- func (md Metadata) Get(key string) (interface{}, bool)
- func (md Metadata) GetAll(key string) []interface{}
- func (md Metadata) Range(fn func(key string, value interface{}) bool)
- type SyncMetadata
- func (md *SyncMetadata) Add(key string, value interface{})
- func (md *SyncMetadata) AddAll(other Metadata)
- func (md *SyncMetadata) Del(key string)
- func (md *SyncMetadata) Get(key string) (interface{}, bool)
- func (md *SyncMetadata) GetAll(key string) []interface{}
- func (md *SyncMetadata) Range(fn func(key string, value interface{}) bool)
- func (md *SyncMetadata) ReadView(fn func(meta Metadata))
- func (md *SyncMetadata) ReadWriteView(fn func(meta *Metadata))
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
type SyncMetadata ¶
type SyncMetadata struct {
// contains filtered or unexported fields
}
SyncMetadata is a version of `Metadata` which allows concurrent modifications to it
func NewSyncMetadata ¶
func NewSyncMetadata() *SyncMetadata
func NewSyncMetadataWith ¶
func NewSyncMetadataWith(meta Metadata) *SyncMetadata
func (*SyncMetadata) Add ¶
func (md *SyncMetadata) Add(key string, value interface{})
func (*SyncMetadata) AddAll ¶
func (md *SyncMetadata) AddAll(other Metadata)
func (*SyncMetadata) Del ¶
func (md *SyncMetadata) Del(key string)
func (*SyncMetadata) Get ¶
func (md *SyncMetadata) Get(key string) (interface{}, bool)
func (*SyncMetadata) GetAll ¶
func (md *SyncMetadata) GetAll(key string) []interface{}
func (*SyncMetadata) Range ¶
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 ¶
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 ¶
func (md *SyncMetadata) ReadWriteView(fn func(meta *Metadata))
Click to show internal directories.
Click to hide internal directories.