package
1.4.0
Repository: https://github.com/hamba/pkg.git
Documentation: pkg.go.dev

# Functions

Close closes the client and flushes buffered stats, if applicable.
Gauge measures the value of a metric.
Group adds a common prefix to a set of stats.
Heartbeat enters a loop, reporting a heartbeat counter periodically.
HeartbeatEvery enters a loop, reporting a heartbeat counter at the specified interval.
HeartbeatFromStatable is the same as HeartbeatEvery but from context.
Inc increments a count by the value.
NewAggregateStatter creates a new aggregate statter, with the given interval.
NewMockStatable creates a new MockLoggable.
NewTaggedStatter creates a new TaggedStatter instance.
Runtime enters a loop, reporting runtime stats periodically.
RuntimeEvery enters a loop, reporting runtime stats at the specified interval.
RuntimeFromStatable is the same as RuntimeEvery but from a Statable.
Time is a shorthand for Timing.
Timing sends the value of a Duration.
Unwrap returns the result of calling the Unwrap method on stats.
WithCounterAggregator sets the aggregator to use with counters.
WithGaugeAggregator sets the aggregator to use with gauges.
WithTimingAggregator sets the aggregator to use with timings.

# Constants

Metric types.
Metric types.
Metric types.

# Variables

DefaultHeartbeatInterval is the default heartbeat ticker interval.
DefaultRuntimeInterval is the default runtime ticker interval.
Null is the null Statter instance.

# Structs

AggregateStatter aggregates the incoming stats for a given interval.
Metric represents a stats metric.
MockStatable implements the Statable interface.
TaggedStatter wraps a Statter instance applying tags to all metrics.

# Interfaces

Aggregator represents a metric aggregator.
Statable represents an object that has a Statter.
Statter represents a stats instance.
Timer represents a timer.
Wrapper represents a statter that can return its wrapped statter.

# Type aliases

AggregateFunc represents a configuration function for an AggregateStatter.