1// Package metrics provides application metrics registration.
2package metrics
3
4import (
5	"time"
6)
7
8type Register interface {
9	// Seen increments the counter with n.
10	Seen(key string, n int)
11
12	// Took adds a timing from since to now.
13	Took(key string, since time.Time)
14
15	// KeyPrefix defines a prefix applied to all keys.
16	KeyPrefix(string)
17}
18
19type dummy struct{}
20
21// NewDummy returns a new Register which does nothing.
22func NewDummy() Register {
23	return dummy{}
24}
25
26func (d dummy) Seen(key string, n int)           {}
27func (d dummy) Took(key string, since time.Time) {}
28func (d dummy) KeyPrefix(s string)               {}
29