metric

package
v1.4.2 Latest Latest
Warning

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

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

Documentation

Overview

---------------------------------------------------------------------------------------------

  • Copyright (c) IBAX. All rights reserved.
  • See LICENSE in the project root for license information. *--------------------------------------------------------------------------------------------

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) []any

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