Documentation ¶
Overview ¶
Package statsdclient provides a client that can format StatsD metrics to a an io.Writer.
Package statsdclient provides a StatsD client that simply formats output to any underlying io.Writer.
this file is auto-generated. do not edit.
parameters:
type: float64 suffix: Float64 valueconv: b = strconv.AppendFloat(b, val, 'f', 10, 64)
Package statsdclient provides a StatsD client that simply formats output to any underlying io.Writer.
this file is auto-generated. do not edit.
parameters:
type: int suffix: valueconv: b = strconv.AppendInt(b, int64(val), 10)
Package statsdclient provides a StatsD client that simply formats output to any underlying io.Writer.
this file is auto-generated. do not edit.
parameters:
type: int64 suffix: Int64 valueconv: b = strconv.AppendInt(b, val, 10)
Index ¶
- type Client
- func (c *Client) Delta(stat string, val int) error
- func (c *Client) DeltaFloat64(stat string, val float64) error
- func (c *Client) DeltaInt64(stat string, val int64) error
- func (c *Client) Gauge(stat string, val int) error
- func (c *Client) GaugeFloat64(stat string, val float64) error
- func (c *Client) GaugeInt64(stat string, val int64) error
- func (c *Client) Inc(stat string, val int) error
- func (c *Client) IncFloat64(stat string, val float64) error
- func (c *Client) IncInt64(stat string, val int64) error
- func (c *Client) SampledDelta(stat string, val int, rate float32) error
- func (c *Client) SampledDeltaFloat64(stat string, val float64, rate float32) error
- func (c *Client) SampledDeltaInt64(stat string, val int64, rate float32) error
- func (c *Client) SampledGauge(stat string, val int, rate float32) error
- func (c *Client) SampledGaugeFloat64(stat string, val float64, rate float32) error
- func (c *Client) SampledGaugeInt64(stat string, val int64, rate float32) error
- func (c *Client) SampledInc(stat string, val int, rate float32) error
- func (c *Client) SampledIncFloat64(stat string, val float64, rate float32) error
- func (c *Client) SampledIncInt64(stat string, val int64, rate float32) error
- func (c *Client) SampledTiming(stat string, duration time.Duration, rate float32) error
- func (c *Client) Timing(stat string, duration time.Duration) error
- func (c *Client) TimingSince(stat string, since time.Time) error
- type ResolvingUDPConn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { // Prefix for every stat. It should not end with '.' Prefix string // Writer we will write all of our measurements to. It will most // likely be a UDP socket for the case of statsd, but can be // anything at all. Writer io.Writer // contains filtered or unexported fields }
Client represents a connection to StatsD. One can view this essentially as a StatsD formatter with convenient methods for measuring counters, gauges, and so on, for different types (int, in64, float64). The formatter just writes a StatsD formatted string to an underlying io.Writer, where in most cases the Writer will be a connection to the StatsD server.
A Client can be used across several goroutines.
func (*Client) DeltaFloat64 ¶
DeltaFloat64 emits a float64 delta.
func (*Client) DeltaInt64 ¶
DeltaInt64 emits a int64 delta.
func (*Client) GaugeFloat64 ¶
GaugeFloat64 emits a float64 gauge.
func (*Client) GaugeInt64 ¶
GaugeInt64 emits a int64 gauge.
func (*Client) IncFloat64 ¶
IncFloat64 emits a float64 counter.
func (*Client) SampledDelta ¶
SampledDelta emits a 'sampled' int delta with the given rate.
func (*Client) SampledDeltaFloat64 ¶
SampledDeltaFloat64 emits a 'sampled' float64 delta with the given rate.
func (*Client) SampledDeltaInt64 ¶
SampledDeltaInt64 emits a 'sampled' int64 delta with the given rate.
func (*Client) SampledGauge ¶
SampledGauge emits a 'sampled' int gauge with the given rate.
func (*Client) SampledGaugeFloat64 ¶
SampledGaugeFloat64 emits a 'sampled' float64 gauge with the given rate.
func (*Client) SampledGaugeInt64 ¶
SampledGaugeInt64 emits a 'sampled' int64 gauge with the given rate.
func (*Client) SampledInc ¶
SampledInc emits a 'sampled' int counter with the given rate.
func (*Client) SampledIncFloat64 ¶
SampledIncFloat64 emits a 'sampled' float64 counter with the given rate.
func (*Client) SampledIncInt64 ¶
SampledIncInt64 emits a 'sampled' int64 counter with the given rate.
func (*Client) SampledTiming ¶
SampledTiming will emit a timing metric + sampling rate.