incoming

package
v2.0.0-beta1+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseByte

func ParseByte(dataItem MetricDataFormat, data []byte) error

ParseByte parse incoming data

Types

type CeilometerMetric

type CeilometerMetric struct {
	Publisher string
	Timestamp time.Time
	EventType string
}

CeilometerMetric struct represents metric data formated and sent by Ceilometer

func (*CeilometerMetric) GetInterval

func (c *CeilometerMetric) GetInterval() float64

GetInterval ...

func (*CeilometerMetric) GetItemKey

func (c *CeilometerMetric) GetItemKey() string

GetItemKey ...

func (*CeilometerMetric) GetKey

func (c *CeilometerMetric) GetKey() string

GetKey ...

func (*CeilometerMetric) GetLabels

func (c *CeilometerMetric) GetLabels() map[string]string

GetLabels ...

func (*CeilometerMetric) GetMetricDesc

func (c *CeilometerMetric) GetMetricDesc(index int) string

GetMetricDesc ...

func (*CeilometerMetric) GetMetricName

func (c *CeilometerMetric) GetMetricName(index int) string

GetMetricName ...

func (*CeilometerMetric) GetName

func (c *CeilometerMetric) GetName() string

GetName ...

func (*CeilometerMetric) ISNew

func (c *CeilometerMetric) ISNew() bool

ISNew ...

func (*CeilometerMetric) ParseInputByte

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

ParseInputByte ...

func (*CeilometerMetric) ParseInputJSON

func (c *CeilometerMetric) ParseInputJSON(json string) ([]MetricDataFormat, error)

ParseInputJSON ...

func (*CeilometerMetric) SetData

func (c *CeilometerMetric) SetData(data MetricDataFormat)

SetData ...

func (*CeilometerMetric) SetNew

func (c *CeilometerMetric) SetNew(new bool)

SetNew ...

type CollectdMetric

type CollectdMetric struct {
	Values         []float64   `json:"values"`
	Dstypes        []string    `json:"dstypes"`
	Dsnames        []string    `json:"dsnames"`
	Time           cdtime.Time `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
}

CollectdMetric struct represents metric data formated and sent by collectd

func (*CollectdMetric) DSName

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

DSName newName converts one data source of a value list to a string representation.

func (*CollectdMetric) GetInterval

func (c *CollectdMetric) GetInterval() float64

GetInterval ...

func (CollectdMetric) GetItemKey

func (c CollectdMetric) GetItemKey() string

GetItemKey ...

func (CollectdMetric) GetKey

func (c CollectdMetric) GetKey() string

GetKey ...

func (CollectdMetric) GetLabels

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

GetLabels ...

func (CollectdMetric) GetMetricDesc

func (c CollectdMetric) GetMetricDesc(index int) string

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

func (CollectdMetric) GetMetricName

func (c CollectdMetric) GetMetricName(index int) string

GetMetricName ...

func (CollectdMetric) GetName

func (c CollectdMetric) GetName() string

GetName implement interface

func (*CollectdMetric) ISNew

func (c *CollectdMetric) ISNew() bool

ISNew ..

func (*CollectdMetric) ParseInputByte

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

ParseInputByte ... TODO(mmagr): probably unify interface with ParseInputJSON

func (*CollectdMetric) ParseInputJSON

func (c *CollectdMetric) ParseInputJSON(jsonString string) ([]MetricDataFormat, error)

ParseInputJSON ...

func (*CollectdMetric) SetData

func (c *CollectdMetric) SetData(data MetricDataFormat)

SetData ...

func (*CollectdMetric) SetNew

func (c *CollectdMetric) SetNew(new bool)

SetNew ...

type MetricDataFormat

type MetricDataFormat interface {
	GetName() string
	SetData(data MetricDataFormat)
	ParseInputJSON(json string) ([]MetricDataFormat, error)
	GetKey() string
	GetItemKey() string
	ParseInputByte(data []byte) error
	GetInterval() float64
	SetNew(new bool)
	ISNew() bool
}

MetricDataFormat ...

func NewFromDataSource

func NewFromDataSource(source saconfig.DataSource) MetricDataFormat

NewFromDataSource creates empty DataType according to given DataSource

Jump to

Keyboard shortcuts

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