metrics

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Namespace   = "spacemesh"
	ResultLabel = "result"
)

Variables

View Source
var Enabled = false

Functions

func StartCollectingMetrics

func StartCollectingMetrics(metricsPort int)

Types

type Cache

type Cache interface {
	Add(key, value interface{}) (evicted bool)
	Get(key interface{}) (value interface{}, ok bool)
}

type Counter

type Counter metrics.Counter

func NewCounter

func NewCounter(name, subsystem, help string, labels []string) Counter

type Gauge

type Gauge metrics.Gauge

func NewGauge

func NewGauge(name, subsystem, help string, labels []string) Gauge

type Histogram

type Histogram metrics.Histogram

func NewHistogram

func NewHistogram(name, subsystem, help string, labels []string) Histogram

type MeteredCache

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

func NewMeteredCache

func NewMeteredCache(cache Cache, subsystem, name, help string, labels []string) *MeteredCache

func (*MeteredCache) Add

func (m *MeteredCache) Add(key, value interface{}) bool

func (*MeteredCache) Get

func (m *MeteredCache) Get(key interface{}) (value interface{}, ok bool)

Jump to

Keyboard shortcuts

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