Documentation
¶
Overview ¶
Package statsd implements an statsd client.
Index ¶
- type BufferedStatsd
- func (s *BufferedStatsd) Close() error
- func (s *BufferedStatsd) Gauge(name string, value float64, rate float32, tags ...string)
- func (s *BufferedStatsd) Inc(name string, value int64, rate float32, tags ...string)
- func (s *BufferedStatsd) Timing(name string, value time.Duration, rate float32, tags ...string)
- type BufferedStatsdFunc
- type Statsd
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BufferedStatsd ¶
type BufferedStatsd struct {
// contains filtered or unexported fields
}
BufferedStatsd represents a buffered statsd client.
func NewBuffered ¶
func NewBuffered(addr, prefix string, opts ...BufferedStatsdFunc) (*BufferedStatsd, error)
NewBuffered create a buffered Statsd instance.
func (*BufferedStatsd) Close ¶
func (s *BufferedStatsd) Close() error
Close closes the client and flushes buffered stats, if applicable
func (*BufferedStatsd) Gauge ¶
func (s *BufferedStatsd) Gauge(name string, value float64, rate float32, tags ...string)
Gauge measures the value of a metric.
type BufferedStatsdFunc ¶
type BufferedStatsdFunc func(*BufferedStatsd)
BufferedStatsdFunc represents an configuration function for BufferedStatsd.
func WithFlushBytes ¶
func WithFlushBytes(bytes int) BufferedStatsdFunc
WithFlushBytes sets the maximum udp packet size that will be sent. Defaults to 1432 flushBytes.
func WithFlushInterval ¶
func WithFlushInterval(interval time.Duration) BufferedStatsdFunc
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.
Click to show internal directories.
Click to hide internal directories.