Documentation ¶
Overview ¶
Package store contains code for storing and retreiving metrics.
Index ¶
- func IsNilStore(s Store) bool
- type Fake
- func (s *Fake) DefaultTarget() types.Target
- func (s *Fake) Get(context.Context, types.Metric, time.Time, []interface{}) (interface{}, error)
- func (s *Fake) GetAll(context.Context) []types.Cell
- func (s *Fake) Incr(context.Context, types.Metric, time.Time, []interface{}, interface{}) error
- func (s *Fake) Register(types.Metric)
- func (s *Fake) Reset(context.Context, types.Metric)
- func (s *Fake) ResetForUnittest()
- func (s *Fake) Set(context.Context, types.Metric, time.Time, []interface{}, interface{}) error
- func (s *Fake) SetDefaultTarget(types.Target)
- func (s *Fake) Unregister(types.Metric)
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Fake ¶
Fake is a fake Store.
func (*Fake) Get ¶
Get does nothing.
func (*Fake) GetAll ¶
GetAll returns the pre-set list of cells.
func (*Fake) Incr ¶
Incr does nothing.
func (*Fake) Set ¶
Set does nothing.
func (*Fake) SetDefaultTarget ¶
SetDefaultTarget does nothing.
type Store ¶
type Store interface { Register(m types.Metric) Unregister(m types.Metric) DefaultTarget() types.Target SetDefaultTarget(t types.Target) Get(c context.Context, m types.Metric, resetTime time.Time, fieldVals []interface{}) (value interface{}, err error) Set(c context.Context, m types.Metric, resetTime time.Time, fieldVals []interface{}, value interface{}) error Incr(c context.Context, m types.Metric, resetTime time.Time, fieldVals []interface{}, delta interface{}) error GetAll(c context.Context) []types.Cell Reset(c context.Context, m types.Metric) }
A Store is responsible for handling all metric data.
func NewInMemory ¶
NewInMemory creates a new metric store that holds metric data in this process' memory.
Click to show internal directories.
Click to hide internal directories.