stats

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2015 License: MIT Imports: 2 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Incr(id string, value int64) error
	Decr(id string, value int64) error
	IncrGauge(id string, value int64) error
	DecrGauge(id string, value int64) error
	SetGauge(id string, value int64) error
}

Client represents the interface for a set of operations that can be performed to track performance of queues and topics in Dynamiq

type NOOPClient

type NOOPClient struct {
}

NOOPClient is to sub in when we don't want to write stats

func NewNOOPClient

func NewNOOPClient() NOOPClient

NewNOOPClient returns a new NOOPClient

func (NOOPClient) Decr

func (c NOOPClient) Decr(id string, value int64) error

Decr does nothing

func (NOOPClient) DecrGauge

func (c NOOPClient) DecrGauge(id string, value int64) error

DecrGauge does nothing

func (NOOPClient) Incr

func (c NOOPClient) Incr(id string, value int64) error

Incr does nothing

func (NOOPClient) IncrGauge

func (c NOOPClient) IncrGauge(id string, value int64) error

IncrGauge does nothing

func (NOOPClient) SetGauge

func (c NOOPClient) SetGauge(id string, value int64) error

SetGauge does nothing

type StatsdClient

type StatsdClient struct {
	// contains filtered or unexported fields
}

StatsdClient will report stats to a StatsD compatible service

func NewStatsdClient

func NewStatsdClient(address string, prefix string, interval time.Duration) StatsdClient

NewStatsdClient will create a new StatsdClient to be used for reporting metrics

func (StatsdClient) Decr

func (c StatsdClient) Decr(id string, value int64) error

Decr decreases the value of a given counter

func (StatsdClient) DecrGauge

func (c StatsdClient) DecrGauge(id string, value int64) error

DecrGauge decreases the value of a given gauge delta

func (StatsdClient) Incr

func (c StatsdClient) Incr(id string, value int64) error

Incr increases the value of a given counter

func (StatsdClient) IncrGauge

func (c StatsdClient) IncrGauge(id string, value int64) error

IncrGauge increases the value of a given gauge delta

func (StatsdClient) SetGauge

func (c StatsdClient) SetGauge(id string, value int64) error

SetGauge sets the level of the given gauge

Jump to

Keyboard shortcuts

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