metrics

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Gauge(name string, value float64, tags []string, rate float64) error
	Count(name string, value int64, tags []string, rate float64) error
	Histogram(name string, value float64, tags []string, rate float64) error
	Decr(name string, tags []string, rate float64) error
	Incr(name string, tags []string, rate float64) error
	Set(name string, value string, tags []string, rate float64) error
	Timing(name string, value time.Duration, tags []string, rate float64) error
	TimeInMilliseconds(name string, value float64, tags []string, rate float64) error
}

Client interface for metrics client currently using: https://github.com/DataDog/datadog-go/statsd

func New

func New(addr string, port int, open bool, bufferSize int) (Client, error)

New initiates a metrics client using statsd

type ClosedClient

type ClosedClient struct {
}

ClosedClient an empty client for using a mocked simple client as a closed

func (ClosedClient) Count

func (c ClosedClient) Count(name string, value int64, tags []string, rate float64) error

Count does nothing

func (ClosedClient) Decr

func (c ClosedClient) Decr(name string, tags []string, rate float64) error

Decr does nothing

func (ClosedClient) Gauge

func (c ClosedClient) Gauge(name string, value float64, tags []string, rate float64) error

Gauge does nothing

func (ClosedClient) Histogram

func (c ClosedClient) Histogram(name string, value float64, tags []string, rate float64) error

Histogram does nothing

func (ClosedClient) Incr

func (c ClosedClient) Incr(name string, tags []string, rate float64) error

Incr does nothing

func (ClosedClient) Set

func (c ClosedClient) Set(name string, value string, tags []string, rate float64) error

Set does nothing

func (ClosedClient) TimeInMilliseconds

func (c ClosedClient) TimeInMilliseconds(name string, value float64, tags []string, rate float64) error

TimeInMilliseconds does nothing

func (ClosedClient) Timing

func (c ClosedClient) Timing(name string, value time.Duration, tags []string, rate float64) error

Timing does nothing

Jump to

Keyboard shortcuts

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