stats

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2019 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sender

type Sender interface {
	Count(metric string, i int)
	Gauge(metric string, n int)
	GaugeMS(metric string, t time.Time)
}

A Sender is used to emit statsd type metrics.

func Discard

func Discard() Sender

func New

func New(s Service, cfg Statsd) (Sender, error)

New creates a new Sender which will send metrics to the receiver described by the cfg.Agent configuration. All metrics will be emittited under the application named by Service s.

type Service

type Service string
const (
	Proxy    Service = "modprox-proxy"
	Registry Service = "modprox-registry"
)

func (Service) String

func (s Service) String() string

type Statsd

type Statsd struct {
	Agent netservice.Instance `json:"agent"`
}

Directories

Path Synopsis
Package statstest contains autogenerated mocks.
Package statstest contains autogenerated mocks.

Jump to

Keyboard shortcuts

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