Documentation
¶
Overview ¶
Package statsd implements an statsd client.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*config)
Option represents statsd option function.
func WithFlushBytes ¶
WithFlushBytes sets the maximum udp packet size that will be sent. Defaults to 1432 flushBytes.
func WithFlushInterval ¶
WithFlushInterval sets the maximum flushInterval for packet sending. Defaults to 300ms.
type Statsd ¶
type Statsd struct {
// contains filtered or unexported fields
}
Statsd is a statsd client.
func New ¶
New returns a statsd reporter.
Example ¶
reporter, err := statsd.New("127.0.0.1:8125", "my-prefix",
statsd.WithFlushBytes(1432),
statsd.WithFlushInterval(300*time.Millisecond),
)
if err != nil {
panic(err)
}
statter.New(reporter, 10*time.Second)
Click to show internal directories.
Click to hide internal directories.