Documentation ¶
Overview ¶
Package tracker contains logic of service stats persistence. This is for the sake of making graphs for README.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { BackendFile *ConfigBackendFile `json:"backend_file"` BackendMemory *ConfigBackendMemory `json:"backend_memory"` Period duration.Duration `json:"period"` }
Config is a configuration of a tracker.
type ConfigBackendFile ¶ added in v0.0.2
type ConfigBackendFile struct {
Path string `json:"path"`
}
ConfigBackendFile configures file backend of a Tracker.
func (*ConfigBackendFile) Prepare ¶ added in v0.0.2
func (c *ConfigBackendFile) Prepare() error
Prepare validates config.
type ConfigBackendMemory ¶ added in v0.0.2
type ConfigBackendMemory struct { }
ConfigBackendMemory configures memory backend of a Tracker.
type Tracker ¶
type Tracker struct {
// contains filtered or unexported fields
}
Tracker is responsible for service stats persistence.
func NewTrackerFromConfig ¶
func NewTrackerFromConfig(logger logr.Logger, cfg *Config, memLimiter memlimiter.Service) (*Tracker, error)
NewTrackerFromConfig is a constructor of a Tracker.
func (*Tracker) GetReports ¶ added in v0.0.2
GetReports returns the accumulated reports.
Click to show internal directories.
Click to hide internal directories.