Documentation ¶
Index ¶
- Variables
- func LogModule(logger telegraf.Logger) *starlarkstruct.Module
- 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() (v starlark.Value, err 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 Starlark
- 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": dict_clear,
"get": dict_get,
"items": dict_items,
"keys": dict_keys,
"pop": dict_pop,
"popitem": dict_popitem,
"setdefault": dict_setdefault,
"update": dict_update,
"values": dict_values,
}
View Source
var TagDictMethods = map[string]builtinMethod{
"clear": dict_clear,
"get": dict_get,
"items": dict_items,
"keys": dict_keys,
"pop": dict_pop,
"popitem": dict_popitem,
"setdefault": dict_setdefault,
"update": dict_update,
"values": dict_values,
}
Functions ¶
Types ¶
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 {
// 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 Starlark ¶
type Starlark struct { Source string `toml:"source"` Script string `toml:"script"` Log telegraf.Logger `toml:"-"` // contains filtered or unexported fields }
func (*Starlark) Description ¶
func (*Starlark) SampleConfig ¶
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.