stats

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2020 License: Apache-2.0 Imports: 12 Imported by: 27

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PushUrl string = "http://127.0.0.1:2058/api/collector/push"
)

Functions

func Init

func Init(prefix string, addr ...string)

func NewMetricValue

func NewMetricValue(metric string, value int64) *dataobj.MetricValue

func Push

func Push()

Types

type CounterMetric

type CounterMetric struct {
	sync.RWMutex
	// contains filtered or unexported fields
}
var Counter *CounterMetric

func NewCounter

func NewCounter(prefix string) *CounterMetric

func (*CounterMetric) Dump

func (c *CounterMetric) Dump() map[string]int

func (*CounterMetric) Set

func (c *CounterMetric) Set(metric string, value int)

Jump to

Keyboard shortcuts

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