stats

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeStats

type FakeStats struct {
}

FakeStats implements Stats interface wherein for instead of sending the stats backend, it just logs the messages.

func NewFake

func NewFake() *FakeStats

NewFake return an instance of FakeStats

func (*FakeStats) Event

func (fs *FakeStats) Event(title, mesg, aggKey, typ string, timestamp time.Time, tags ...string)

Event captures the details of events in log

func (*FakeStats) IncCount

func (fs *FakeStats) IncCount(name string, tags ...string)

IncCount is used to capture stats are are continuous

func (*FakeStats) ServiceCheck

func (fs *FakeStats) ServiceCheck(name, mesg string, status int, timestamp time.Time, tags ...string)

ServiceCheck logs the status of service

type Stats

type Stats interface {
	// IncCount captures the continuous stats (identified by name)
	// and delivers it to statsd backend
	IncCount(name string, tags ...string)

	// ServiceCheck captures the status of a service when a change in the
	// service status was notified
	ServiceCheck(name, mesg string, status int, timestamp time.Time, tags ...string)

	// Event contains details of an activity that was captured and
	// notifies it to stats backend
	Event(title, mesg, aggKey, typ string, timestamp time.Time, tags ...string)
}

Stats allows sending increment, service check and event message to statsd backend

Directories

Path Synopsis
Package datadog provides stats logging using datadog.
Package datadog provides stats logging using datadog.

Jump to

Keyboard shortcuts

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