asyncstatsd

package module
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2017 License: MIT Imports: 3 Imported by: 0

README

An async wrapper around https://github.com/alexcesaro/statsd

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Count(bucket string, n interface{})
	Gauge(bucket string, value interface{})
	Increment(bucket string)
	Histogram(bucket string, value interface{})
	Timing(bucket string, value interface{})

	Clone(opts ...statsd.Option) Client
	NewTiming() Timing
}

func New

func New(c *statsd.Client, queueSize int) Client

New returns a new statsdclient

func NewNoop added in v1.1.0

func NewNoop() Client

NewNoop returns a new noop client

type RunQueue

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

func NewRunQueue

func NewRunQueue(size int) *RunQueue

New returns a new runqueue

func (*RunQueue) Close

func (r *RunQueue) Close()

Close closes the run queue channel

func (*RunQueue) Queue

func (r *RunQueue) Queue(f func())

Queue queues a function to be run

type Timing

type Timing interface {
	Duration() time.Duration
	Send(bucket string)
}

Jump to

Keyboard shortcuts

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