adapter

package
Version: v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2017 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Adapters

func Adapters() []string

Adapters returns the list of registered adapters

func New

func New(config *config.Stats) (stats.Stats, error)

func Register

func Register(name string, adapter Adapter)

Register makes a stats adapter available by the provided name. If an adapter is registered twice or if an adapter is nil, it will panic.

Types

type Adapter

type Adapter func(config map[string]string) (stats.Stats, error)

Adapter returns a new store initialised with the given config

type Void

type Void struct{}

Void is a null stats adapter

func (*Void) Count

func (s *Void) Count(key string, n interface{}, meta ...map[string]string)

func (*Void) Dec

func (s *Void) Dec(key string, meta ...map[string]string)

func (*Void) Gauge

func (s *Void) Gauge(key string, n interface{}, meta ...map[string]string)

func (*Void) Histogram

func (s *Void) Histogram(key string, n interface{}, tags ...map[string]string)

func (*Void) Inc

func (s *Void) Inc(key string, meta ...map[string]string)

func (*Void) SetLogger

func (s *Void) SetLogger(l log.Logger)

func (*Void) Start

func (s *Void) Start()

func (*Void) Stop

func (s *Void) Stop()

func (*Void) Timing

func (s *Void) Timing(key string, t time.Duration, meta ...map[string]string)

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL