Documentation
¶
Index ¶
- type CollectChunk
- type Collector
- type Metric
- func (m *Metric) AddTags(tags map[string]string)
- func (m Metric) Description() string
- func (m Metric) Namespace() plugin.Namespace
- func (m *Metric) RemoveTags(keys []string)
- func (m *Metric) SetDescription(description string)
- func (m *Metric) SetTimestamp(timestamp time.Time)
- func (m *Metric) SetType(type_ plugin.MetricType)
- func (m *Metric) SetUnit(unit string)
- func (m Metric) String() string
- func (m Metric) Tags() map[string]string
- func (m Metric) Timestamp() time.Time
- func (m Metric) Type() plugin.MetricType
- func (m Metric) Unit() string
- func (m Metric) Value() interface{}
- type Namespace
- type NamespaceElement
- type PluginType
- type ProcessingStatus
- type Warning
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CollectChunk ¶
type Collector ¶
type Collector interface {
plugin.Collector
plugin.StreamingCollector
Name() string
Version() string
Type() PluginType
Unwrap() interface{} // Returns wrapped user-defined collector or streaming collector (with access to Load(), Unload() etc.)
}
Simple wrapper which enables using common code for collector and streaming collector.
func NewCollector ¶
func NewStreamingCollector ¶
func NewStreamingCollector(name string, version string, collector plugin.StreamingCollector) Collector
type Metric ¶
type Metric struct {
Namespace_ []NamespaceElement
Value_ interface{}
Tags_ map[string]string
Unit_ string
Timestamp_ time.Time
Description_ string
Type_ plugin.MetricType
}
func (Metric) Description ¶
func (*Metric) RemoveTags ¶
func (*Metric) SetDescription ¶
func (*Metric) SetTimestamp ¶
func (*Metric) SetType ¶ added in v2.3.0
func (m *Metric) SetType(type_ plugin.MetricType)
func (Metric) Type ¶ added in v2.3.0
func (m Metric) Type() plugin.MetricType
type NamespaceElement ¶
func (*NamespaceElement) Description ¶
func (ns *NamespaceElement) Description() string
func (*NamespaceElement) IsDynamic ¶
func (ns *NamespaceElement) IsDynamic() bool
func (*NamespaceElement) Name ¶
func (ns *NamespaceElement) Name() string
func (*NamespaceElement) String ¶
func (ns *NamespaceElement) String() string
func (*NamespaceElement) Value ¶
func (ns *NamespaceElement) Value() string
type PluginType ¶
type PluginType int
const ( PluginTypeCollector PluginType = iota PluginTypeProcessor PluginTypePublisher PluginTypeStreamingCollector )
func (PluginType) String ¶
func (pt PluginType) String() string
type ProcessingStatus ¶
Contains additional information about warnings raised during collect / publish processes
Click to show internal directories.
Click to hide internal directories.