Documentation
¶
Index ¶
- type Client
- func (c *Client) Annotate(name string, value string, args ...interface{}) error
- func (c *Client) Close() error
- func (c *Client) Decr(stat string) error
- func (c *Client) DecrBy(stat string, value int) error
- func (c *Client) Decrement(stat string, count int, rate float64) error
- func (c *Client) DecrementGauge(stat string, value int, rate float64) error
- func (c *Client) DecrementGaugeBy(stat string, value int) error
- func (c *Client) Duration(stat string, duration time.Duration, rate float64) error
- func (c *Client) DurationSince(stat string, t time.Time) error
- func (c *Client) Flush() error
- func (c *Client) Gauge(stat string, value int, rate float64) error
- func (c *Client) Histogram(stat string, value int, rate float64) error
- func (c *Client) Incr(stat string) error
- func (c *Client) IncrBy(stat string, n int) error
- func (c *Client) Increment(stat string, count int, rate float64) error
- func (c *Client) IncrementGauge(stat string, value int, rate float64) error
- func (c *Client) IncrementGaugeBy(stat string, value int) error
- func (c *Client) Prefix(s string)
- func (c *Client) Time(stat string, rate float64, f func()) error
- func (c *Client) Timing(stat string, delta int, rate float64) error
- func (c *Client) Unique(stat string, value int, rate float64) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is statsd client representing a connection to a statsd server.
func Dial ¶
Dial connects to the given address on the given network using net.Dial and then returns a new Client for the connection.
func DialSize ¶
DialSize acts like Dial but takes a packet size. By default, the packet size is 512, see https://github.com/etsy/statsd/blob/master/docs/metric_types.md#multi-metric-packets for guidelines.
func DialTimeout ¶
DialTimeout acts like Dial but takes a timeout. The timeout includes name resolution, if required.
func (*Client) DecrementGauge ¶
DecrementGauge decrements the value of the gauge.
func (*Client) DecrementGaugeBy ¶
DecrementGaugeBy decrements the value of the gauge.
func (*Client) DurationSince ¶
DurationSince records time spent for the given bucket since `t`.
func (*Client) Histogram ¶
Histogram is an alias of .Timing() until statsd implementations figure their shit out.
func (*Client) IncrementGauge ¶
IncrementGauge increments the value of the gauge.
func (*Client) IncrementGaugeBy ¶
IncrementGaugeBy increments the value of the gauge.
func (*Client) Prefix ¶
Prefix adds a prefix to every stat string. The prefix is literal, so if you want "foo.bar.baz" from "baz" you should set the prefix to "foo.bar." not "foo.bar" as no delimiter is added for you.