statsdclient

package module
v0.0.0-...-fb0d86d Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2015 License: MIT Imports: 5 Imported by: 0

README

go-statsdclient

Build Status

For documentation, check godoc.

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

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) Delta

func (c *Client) Delta(stat string, val int) error

Delta emits a int delta.

func (*Client) DeltaFloat64

func (c *Client) DeltaFloat64(stat string, val float64) error

DeltaFloat64 emits a float64 delta.

func (*Client) DeltaInt64

func (c *Client) DeltaInt64(stat string, val int64) error

DeltaInt64 emits a int64 delta.

func (*Client) Gauge

func (c *Client) Gauge(stat string, val int) error

Gauge emits a int gauge.

func (*Client) GaugeFloat64

func (c *Client) GaugeFloat64(stat string, val float64) error

GaugeFloat64 emits a float64 gauge.

func (*Client) GaugeInt64

func (c *Client) GaugeInt64(stat string, val int64) error

GaugeInt64 emits a int64 gauge.

func (*Client) Inc

func (c *Client) Inc(stat string, val int) error

Inc emits a int counter.

func (*Client) IncFloat64

func (c *Client) IncFloat64(stat string, val float64) error

IncFloat64 emits a float64 counter.

func (*Client) IncInt64

func (c *Client) IncInt64(stat string, val int64) error

IncInt64 emits a int64 counter.

func (*Client) SampledDelta

func (c *Client) SampledDelta(stat string, val int, rate float32) error

SampledDelta emits a 'sampled' int delta with the given rate.

func (*Client) SampledDeltaFloat64

func (c *Client) SampledDeltaFloat64(stat string, val float64, rate float32) error

SampledDeltaFloat64 emits a 'sampled' float64 delta with the given rate.

func (*Client) SampledDeltaInt64

func (c *Client) SampledDeltaInt64(stat string, val int64, rate float32) error

SampledDeltaInt64 emits a 'sampled' int64 delta with the given rate.

func (*Client) SampledGauge

func (c *Client) SampledGauge(stat string, val int, rate float32) error

SampledGauge emits a 'sampled' int gauge with the given rate.

func (*Client) SampledGaugeFloat64

func (c *Client) SampledGaugeFloat64(stat string, val float64, rate float32) error

SampledGaugeFloat64 emits a 'sampled' float64 gauge with the given rate.

func (*Client) SampledGaugeInt64

func (c *Client) SampledGaugeInt64(stat string, val int64, rate float32) error

SampledGaugeInt64 emits a 'sampled' int64 gauge with the given rate.

func (*Client) SampledInc

func (c *Client) SampledInc(stat string, val int, rate float32) error

SampledInc emits a 'sampled' int counter with the given rate.

func (*Client) SampledIncFloat64

func (c *Client) SampledIncFloat64(stat string, val float64, rate float32) error

SampledIncFloat64 emits a 'sampled' float64 counter with the given rate.

func (*Client) SampledIncInt64

func (c *Client) SampledIncInt64(stat string, val int64, rate float32) error

SampledIncInt64 emits a 'sampled' int64 counter with the given rate.

func (*Client) SampledTiming

func (c *Client) SampledTiming(stat string, duration time.Duration, rate float32) error

SampledTiming will emit a timing metric + sampling rate.

func (*Client) Timing

func (c *Client) Timing(stat string, duration time.Duration) error

Timing will emit a timing metric with a sample rate of 1.0

func (*Client) TimingSince

func (c *Client) TimingSince(stat string, since time.Time) error

TimingSince will return a timer since a given time.

type ResolvingUDPConn

type ResolvingUDPConn struct {
	Addr   string
	Window time.Duration
	// contains filtered or unexported fields
}

func (*ResolvingUDPConn) Write

func (s *ResolvingUDPConn) Write(b []byte) (int, error)

Directories

Path Synopsis
internal
gen
Generates Counter, Gauge, Delta code for a given datatype
Generates Counter, Gauge, Delta code for a given datatype

Jump to

Keyboard shortcuts

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