Documentation
¶
Overview ¶
Package cache implements a cache for time series data.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TimeStore ¶
type TimeStore interface {
// Put stores a TimePoint to the TimeStore. Returns error upon failure.
// Ignores zero timestamps.
Put(tp TimePoint) error
// Get returns a slice of elements that were previously stored with timestamps
// between 'start' and 'end'. 'start' is expected to be before 'end'.
// If 'start' is zero, it returns all the elements up until 'end'.
// If 'end' is zero, it returns all the elements from 'start'.
// If both 'start' and 'end' are zero, it returns all the elements in the store.
Get(start, end time.Time) []TimePoint
// Delete removes all elements that were previously stored with timestamps
// between 'start' and 'end'.
Delete(start, end time.Time) error
}
TimeStore represents a timeseries storage. Implementations are expected to be thread safe.
func NewCMAStore ¶ added in v0.16.0
func NewCMAStore() TimeStore
func NewTimeStore ¶
func NewTimeStore() TimeStore
Click to show internal directories.
Click to hide internal directories.