Back to godoc.org

Package statsd

v0.16.1
Latest Go to latest

The latest major version is .

Published: Oct 2, 2019 | License: MIT | Module: github.com/andreiubr/yab

Index

type Client

type Client interface {
	Inc(stat string)
	Timing(stat string, d time.Duration)
}

Client is the statsd interface that we use.

var Noop Client = client{ensureStatsd(statsd.NewNoopClient())}

Noop is a no-op statsd client.

func MultiClient

func MultiClient(clients ...Client) Client

MultiClient combines multiple Clients into a single Client.

func NewClient

func NewClient(logger *zap.Logger, statsdHostPort, service, method string) (Client, error)

NewClient returns a Client that sends metrics to statsd.

func NewPrefixedClient

func NewPrefixedClient(client Client, prefix string) Client

NewPrefixedClient wraps the provided client to add a prefix to all calls.

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier