incoming

package
v0.0.0-...-771c5c2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 25, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

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

func (c *Collectd) DSName(index int) string

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

func (c Collectd) GenerateSampleJSON(hostname string, pluginname string) string

GenerateSampleJSON ... for samples

func (Collectd) GetItemKey

func (c Collectd) GetItemKey() string

GetItemKey ...

func (Collectd) GetKey

func (c Collectd) GetKey() string

GetKey ...

func (Collectd) GetLabels

func (c Collectd) GetLabels() map[string]string

GetLabels ..

func (Collectd) GetMetricDesc

func (c Collectd) GetMetricDesc(index int) string

GetMetricDesc newDesc converts one data source of a value list to a Prometheus description.

func (Collectd) GetMetricName

func (c Collectd) GetMetricName(index int) string

GetMetricName ..

func (Collectd) GetName

func (c Collectd) GetName() string

GetName implement interface

func (*Collectd) ISNew

func (c *Collectd) ISNew() bool

ISNew ..

func (*Collectd) ParseInputByte

func (c *Collectd) ParseInputByte(data []byte) error

ParseInputByte ....

func (*Collectd) ParseInputJSON

func (c *Collectd) ParseInputJSON(jsonString string) error

ParseInputJSON ...

func (*Collectd) SetData

func (c *Collectd) SetData(data DataTypeInterface)

SetData ...

func (*Collectd) SetNew

func (c *Collectd) SetNew(new bool)

SetNew .

type DataType

type DataType int

DataType ..

const (
	COLLECTD DataType = 1 << iota
)

COLLECTD

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

func NewInComing

func NewInComing(t DataType) DataTypeInterface

NewInComing ..

type TSDB

type TSDB interface {
	//prometheus specifivreflect
	GetLabels() map[string]string
	GetMetricName(index int) string
	GetMetricDesc(index int) string
}

TSDB interface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL