Versions in this module Expand all Collapse all v0 v0.0.4 Feb 12, 2022 Changes in this version + const ASC + const DESC + var ErrSeriesNotFound = errors.New("timeseries not found") + type Database interface + Add func(name string, timeseries TimeSeries) error + Close func() error + Create func(name string) error + Delete func(series string) error + Get func(series string) (timeSeries TimeSeries, err error) + GetOnChannel func(series string) (timeseries <-chan TimeEntry, err chan error) + GetPages func(q Query) (seriesList []int64, count int, err error) + Query func(q Query) (timeSeries TimeSeries, nextEntry *int64, err error) + QueryOnChannel func(q Query) (timeseries <-chan TimeEntry, nextEntry chan *int64, err chan error) + func Open(config interface{}) (Database, error) + type MemCacheConfig struct + Mode os.FileMode + Path string + type MemCacheDB struct + func (mem MemCacheDB) Add(name string, timeseries TimeSeries) error + func (mem MemCacheDB) Close() error + func (mem MemCacheDB) Create(name string) error + func (mem MemCacheDB) Delete(series string) error + func (mem MemCacheDB) Get(series string) (TimeSeries, error) + func (mem MemCacheDB) GetOnChannel(series string) (<-chan TimeEntry, chan error) + func (mem MemCacheDB) GetPages(q Query) ([]int64, int, error) + func (mem MemCacheDB) Query(q Query) (timeSeries TimeSeries, nextEntry *int64, err error) + func (mem MemCacheDB) QueryOnChannel(q Query) (<-chan TimeEntry, chan *int64, chan error) + type Query struct + From int64 + MaxEntries int + Series string + Sort string + To int64 + type TimeEntry struct + Time int64 + Value []byte + type TimeSeries []TimeEntry