metric

package
v0.0.0-...-8e17a21 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2020 License: GPL-2.0 Imports: 6 Imported by: 0

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(timeBlock int64) []interface{}

Values returns values of all metrics

type CollectorFunc

type CollectorFunc func(int64) ([]*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(timeBlock int64) (metricValues []*Value, err error)

CollectMetricDataForEcosystemTables returns metrics for some tables of ecosystems

func CollectMetricDataForEcosystemTx

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

CollectMetricDataForEcosystemTx returns metrics for transactions of ecosystems

func (*Value) ToMap

func (v *Value) ToMap() *types.Map

ToMap returns values as map

Jump to

Keyboard shortcuts

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