Documentation ¶
Index ¶
- func GenerateJSON(dataItem DataTypeInterface, key string, itemkey string) string
- func ParseByte(dataItem DataTypeInterface, data []byte) error
- type Collectd
- func (c *Collectd) DSName(index int) string
- func (c *Collectd) GenerateSampleData(hostname string, pluginname string) DataTypeInterface
- func (c Collectd) GenerateSampleJSON(hostname string, pluginname string) string
- func (c Collectd) GetItemKey() string
- func (c Collectd) GetKey() string
- func (c Collectd) GetLabels() map[string]string
- func (c Collectd) GetMetricDesc(index int) string
- func (c Collectd) GetMetricName(index int) string
- func (c Collectd) GetName() string
- func (c *Collectd) ISNew() bool
- func (c *Collectd) ParseInputByte(data []byte) error
- func (c *Collectd) ParseInputJSON(jsonString string) error
- func (c *Collectd) SetData(data DataTypeInterface)
- func (c *Collectd) SetNew(new bool)
- type DataType
- type DataTypeInterface
- type TSDB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateJSON ¶
func GenerateJSON(dataItem DataTypeInterface, key string, itemkey string) string
GenerateJSON Generates sample data in json format
func ParseByte ¶
func ParseByte(dataItem DataTypeInterface, data []byte) error
ParseByte parse incoming data
Types ¶
type Collectd ¶
type Collectd struct { Values []float64 Dstypes []string Dsnames []string Time float64 `json:"time"` Interval float64 `json:"interval"` Host string `json:"host"` Plugin string `json:"plugin"` PluginInstance string `json:"plugin_instance"` Type string `json:"type"` TypeInstance string `json:"type_instance"` // contains filtered or unexported fields }
Collectd ...
func (*Collectd) DSName ¶
DSName newName converts one data source of a value list to a string representation.
func (*Collectd) GenerateSampleData ¶
func (c *Collectd) GenerateSampleData(hostname string, pluginname string) DataTypeInterface
GenerateSampleData ...
func (Collectd) GenerateSampleJSON ¶
GenerateSampleJSON ... for samples
func (Collectd) GetMetricDesc ¶
GetMetricDesc newDesc converts one data source of a value list to a Prometheus description.
func (*Collectd) ParseInputByte ¶
ParseInputByte ....
func (*Collectd) ParseInputJSON ¶
ParseInputJSON ...
type DataTypeInterface ¶
type DataTypeInterface interface { GetName() string SetData(data DataTypeInterface) ParseInputJSON(json string) error GetKey() string GetItemKey() string GenerateSampleData(key string, itemkey string) DataTypeInterface GenerateSampleJSON(key string, itemkey string) string ParseInputByte(data []byte) error //GenerateSamples(jsonstring string) *Interface SetNew(new bool) ISNew() bool TSDB }
DataTypeInterface ...
func GenerateData ¶
func GenerateData(dataItem DataTypeInterface, key string, itemkey string) DataTypeInterface
GenerateData Generates sample data in source format
Click to show internal directories.
Click to hide internal directories.