Documentation ¶
Index ¶
- Variables
- func LoadFunc(module string, logger telegraf.Logger) (starlark.StringDict, error)
- func LogModule(logger telegraf.Logger) *starlarkstruct.Module
- type Common
- type FieldDict
- func (d FieldDict) Attr(name string) (starlark.Value, error)
- func (d FieldDict) AttrNames() []string
- func (d FieldDict) Clear() error
- func (d FieldDict) Delete(k starlark.Value) (v starlark.Value, found bool, err error)
- func (d FieldDict) Freeze()
- func (d FieldDict) Get(key starlark.Value) (v starlark.Value, found bool, err error)
- func (d FieldDict) Hash() (uint32, error)
- func (d FieldDict) Items() []starlark.Tuple
- func (d FieldDict) Iterate() starlark.Iterator
- func (d FieldDict) PopItem() (starlark.Value, error)
- func (d FieldDict) SetKey(k, v starlark.Value) error
- func (d FieldDict) String() string
- func (d FieldDict) Truth() starlark.Bool
- func (d FieldDict) Type() string
- type FieldIterator
- type Metric
- func (m *Metric) Attr(name string) (starlark.Value, error)
- func (m *Metric) AttrNames() []string
- func (m *Metric) Fields() FieldDict
- func (m *Metric) Freeze()
- func (m *Metric) Hash() (uint32, error)
- func (m *Metric) Name() starlark.String
- func (m *Metric) SetField(name string, value starlark.Value) error
- func (m *Metric) SetName(value starlark.Value) error
- func (m *Metric) SetTime(value starlark.Value) error
- func (m *Metric) String() string
- func (m *Metric) Tags() TagDict
- func (m *Metric) Time() starlark.Int
- func (m *Metric) Truth() starlark.Bool
- func (m *Metric) Type() string
- func (m *Metric) Unwrap() telegraf.Metric
- func (m *Metric) Wrap(metric telegraf.Metric)
- type TagDict
- func (d TagDict) Attr(name string) (starlark.Value, error)
- func (d TagDict) AttrNames() []string
- func (d TagDict) Clear() error
- func (d TagDict) Delete(k starlark.Value) (v starlark.Value, found bool, err error)
- func (d TagDict) Freeze()
- func (d TagDict) Get(key starlark.Value) (v starlark.Value, found bool, err error)
- func (d TagDict) Hash() (uint32, error)
- func (d TagDict) Items() []starlark.Tuple
- func (d TagDict) Iterate() starlark.Iterator
- func (d TagDict) PopItem() (v starlark.Value, err error)
- func (d TagDict) SetKey(k, v starlark.Value) error
- func (d TagDict) String() string
- func (d TagDict) Truth() starlark.Bool
- func (d TagDict) Type() string
- type TagIterator
Constants ¶
This section is empty.
Variables ¶
View Source
var FieldDictMethods = map[string]builtinMethod{
"clear": dictClear,
"get": dictGet,
"items": dictItems,
"keys": dictKeys,
"pop": dictPop,
"popitem": dictPopitem,
"setdefault": dictSetdefault,
"update": dictUpdate,
"values": dictValues,
}
View Source
var TagDictMethods = map[string]builtinMethod{
"clear": dictClear,
"get": dictGet,
"items": dictItems,
"keys": dictKeys,
"pop": dictPop,
"popitem": dictPopitem,
"setdefault": dictSetdefault,
"update": dictUpdate,
"values": dictValues,
}
Functions ¶
Types ¶
type Common ¶ added in v1.24.3
type Common struct { Source string `toml:"source"` Script string `toml:"script"` Constants map[string]interface{} `toml:"constants"` Log telegraf.Logger `toml:"-"` StarlarkLoadFunc func(module string, logger telegraf.Logger) (starlark.StringDict, error) // contains filtered or unexported fields }
func (*Common) AddFunction ¶ added in v1.24.3
func (*Common) GetParameters ¶ added in v1.24.3
type FieldDict ¶
type FieldDict struct {
*Metric
}
FieldDict is a starlark.Value for the metric fields. It is heavily based on the starlark.Dict.
type FieldIterator ¶
type FieldIterator struct { *Metric // contains filtered or unexported fields }
func (*FieldIterator) Done ¶
func (i *FieldIterator) Done()
Done implements the starlark.Iterator interface.
type Metric ¶
type Metric struct { ID telegraf.TrackingID // contains filtered or unexported fields }
func (*Metric) String ¶
String returns the starlark representation of the Metric.
The String function is called by both the repr() and str() functions, and so it behaves more like the repr function would in Python.
type TagDict ¶
type TagDict struct {
*Metric
}
TagDict is a starlark.Value for the metric tags. It is heavily based on the starlark.Dict.
type TagIterator ¶
type TagIterator struct { *Metric // contains filtered or unexported fields }
func (*TagIterator) Done ¶
func (i *TagIterator) Done()
Done implements the starlark.Iterator interface.
Click to show internal directories.
Click to hide internal directories.