metric

package
v0.0.0-...-5ecede5 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2018 License: LGPL-3.0-or-later Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

type Collector struct {
	// contains filtered or unexported fields
}

Collector represents struct that works with the collection of metrics

func NewCollector

func NewCollector(funcs ...CollectorFunc) *Collector

NewCollector creates new collector

func (*Collector) Values

func (c *Collector) Values() []interface{}

Values returns values of all metrics

type CollectorFunc

type CollectorFunc func() ([]*Value, error)

CollectorFunc represents function for collects values of metrics

type Value

type Value struct {
	Time   int64
	Metric string
	Key    string
	Value  int64
}

Value represents value of metrics

func CollectMetricDataForEcosystemTables

func CollectMetricDataForEcosystemTables() (metricValues []*Value, err error)

CollectMetricDataForEcosystemTables returns metrics for some tables of ecosystems

func CollectMetricDataForEcosystemTx

func CollectMetricDataForEcosystemTx() (metricValues []*Value, err error)

CollectMetricDataForEcosystemTx returns metrics for transactions of ecosystems

func (*Value) ToMap

func (v *Value) ToMap() map[string]interface{}

ToMap returns values as map

Jump to

Keyboard shortcuts

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