stats

package
v0.0.0-...-1aaebbc Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	io.Closer
	Incr(string, int64)
	Gauge(string, int64)
	GaugeDelta(string, int64)
	Timing(string, time.Time)
}

Client exposes all the behavior for capturing and and sending various measurements to a metrics sink.

func NewNoOpClient

func NewNoOpClient() Client

NewNoOpClient creates a metrics client that does not send any measurements.

func NewStatsDClient

func NewStatsDClient(statsdAddr, metricPrfx string, defTags ...Tag) Client

NewStatsDClient creates a metrics client that sends various measurements to StatsD client.

type Tag

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

Tag represents the key value pair that is sent along with every measurement to a metrics sink.

func NewTag

func NewTag(key, val string) Tag

NewTag creates an instance of the Tag type.

Jump to

Keyboard shortcuts

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