package
0.2.0
Repository: https://github.com/unit-io/unitdb.git
Documentation: pkg.go.dev

# Functions

GetOrRegisterCounter returns an existing Counter or constructs and registers a new StandardCounter.
GetOrRegisterGauge returns an existing Gauge or constructs and registers a new StandardGauge.
GetOrRegisterHistogram returns an existing Histogram or constructs and registers a new StandardHistogram.
GetOrRegisterTimeSeries returns an existing timeseries or constructs and registers a new StandardTimeSeries.
NewCounter constructs a new StandardCounter.
NewGauge constructs a new StandardGauge.
NewHistogram constructs a new StandardHistogram from a Sample.
NewMetrics new metrics create a new registry.
NewSample initializes a new metric sample.
NewSampleSnapshot returns a read-only copy of the sample.
NewTimeSeries constructs a new StandardTimeSeries using an exponentially-decaying sample with the same reservoir size and alpha as UNIX load averages.

# Structs

Config sample config.
HistogramSnapshot is a read-only copy of another Histogram.
SampleSnapshot is a read-only copy of another Sample.
StandardMetrics the standard implementation of a Registry is a mutex-protected map of names to metrics.
TimeSeriesSnapshot is a read-only copy of another Timer.

# Interfaces

Counter hold an int64 value that can be incremented and decremented.
Gauge hold an int64 value that can be set arbitrarily.
Histogram calculate distribution statistics from a series of int64 values.
Metrics A Metrics holds registry references to a set of metrics by name and can iterate over them, calling callback functions provided by the user.
Sample a stream.
Stoppable defines the metrics which has to be stopped.
TimeSeries capture the duration and rate of events.

# Type aliases

CounterSnapshot is a read-only copy of another Counter.
DuplicateMetric is the error returned by Registry.Register when a metric already exists.
GaugeSnapshot is a read-only copy of another Gauge.