Documentation
¶
Overview ¶
Package file provides a file-persisted stats collector. It wraps the in-memory collector and periodically (or on Flush) saves state to a gob-encoded file. On startup, the file is loaded to restore previous state.
Index ¶
- type Collector
- func (c *Collector) Close() error
- func (c *Collector) Counter(key string) stats.Counter
- func (c *Collector) Flush() error
- func (c *Collector) Gauge(key string) stats.Gauge
- func (c *Collector) HLL(key string) stats.HLL
- func (c *Collector) Set(key string) stats.Set
- func (c *Collector) Timer(key string) stats.Timer
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
Collector wraps memory.Collector with file persistence. It implements stats.Collector.
func New ¶
New creates a file-persisted collector. The file is loaded on startup (if it exists) and saved on Flush/Close.
Click to show internal directories.
Click to hide internal directories.