Documentation
¶
Overview ¶
Package quartzdb implements QuartzDB client in go QuartzDB is flat-file database optimized to hold time-series data.
Index ¶
- type QuartzDB
- func (q QuartzDB) Add(record storage.Record) (int, error)
- func (q QuartzDB) GetByDate(date time.Time) (*storage.Record, error)
- func (q QuartzDB) QueryLast(n int) ([]storage.Record, error)
- func (q QuartzDB) QueryRange(from time.Time, to time.Time) ([]storage.Record, error)
- func (q QuartzDB) QueryRangeCallback(from time.Time, to time.Time, callback storage.QueryCallback) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type QuartzDB ¶
type QuartzDB struct {
// contains filtered or unexported fields
}
QuartzDB contains the database interface
func NewQuartzDB ¶
func NewQuartzDB(storage storage.QuartzDBStorage) *QuartzDB
NewQuartzDB creates new database instance given a storage client
func (QuartzDB) QueryRange ¶
QueryRange returns list of records dated between from and to timestamps
func (QuartzDB) QueryRangeCallback ¶
func (q QuartzDB) QueryRangeCallback(from time.Time, to time.Time, callback storage.QueryCallback) error
QueryRangeCallback calls the callback function for each record that is dated between the from and to timestamps
Click to show internal directories.
Click to hide internal directories.