statsd

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License: MIT 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 {
	Timing(name string, value time.Duration, tags []string, rate float64) error
	Gauge(name string, value float64, tags []string, rate float64) error
	Histogram(name string, value float64, tags []string, rate float64) error
	Count(name string, value int64, tags []string, rate float64) error
}

Client defines the statsD client exported interface

func New

func New(host string, port int) Client

New creates a new datadog statsd client

func NewNoop

func NewNoop() Client

NewNoop returns a new No op statsD client. This is expected to useful in testing and to adding "standard" instrumentation to shared packages. As such this client is safe to be used in init() functions in libraries (skipping a tonne of nil checks)

Jump to

Keyboard shortcuts

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