Documentation ¶
Index ¶
- Constants
- type ChangedRange
- type Quasar
- func (q *Quasar) DeleteRange(id uuid.UUID, start int64, end int64) error
- func (q *Quasar) InsertValues(id uuid.UUID, r []qtree.Record)
- func (q *Quasar) IsPending() bool
- func (q *Quasar) QueryChangedRanges(id uuid.UUID, startgen uint64, endgen uint64, resolution uint8) ([]ChangedRange, uint64, error)
- func (q *Quasar) QueryGeneration(id uuid.UUID) (uint64, error)
- func (q *Quasar) QueryNearestValue(id uuid.UUID, time int64, backwards bool, gen uint64) (qtree.Record, uint64, error)
- func (q *Quasar) QueryStatisticalValues(id uuid.UUID, start int64, end int64, gen uint64, pointwidth uint8) ([]qtree.StatRecord, uint64, error)
- func (q *Quasar) QueryStatisticalValuesStream(id uuid.UUID, start int64, end int64, gen uint64, pointwidth uint8) (chan qtree.StatRecord, chan error, uint64)
- func (q *Quasar) QueryValues(id uuid.UUID, start int64, end int64, gen uint64) ([]qtree.Record, uint64, error)
- func (q *Quasar) QueryValuesStream(id uuid.UUID, start int64, end int64, gen uint64) (chan qtree.Record, chan error, uint64)
- func (q *Quasar) QueryWindow(id uuid.UUID, start int64, end int64, gen uint64, width uint64, depth uint8) (chan qtree.StatRecord, uint64)
- type QuasarConfig
Constants ¶
View Source
const LatestGeneration = bstore.LatestGeneration
View Source
const MaximumTime = 64 << 56
View Source
const MinimumTime = 0
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChangedRange ¶
type Quasar ¶
type Quasar struct {
// contains filtered or unexported fields
}
func NewQuasar ¶
func NewQuasar(cfg *QuasarConfig) (*Quasar, error)
func (*Quasar) DeleteRange ¶
删除某个时间区间,这边涉及到写的问题
func (*Quasar) InsertValues ¶
插入数据点,如果没达到 buffer 限制,将数据插入到 buffer,否则将会提前刷新数据
func (*Quasar) IsPending ¶
判断是否有数据在 buffer 之中 Return true if there are uncommited results to be written to disk Should only be used during shutdown as it hogs the glock
func (*Quasar) QueryChangedRanges ¶
func (q *Quasar) QueryChangedRanges(id uuid.UUID, startgen uint64, endgen uint64, resolution uint8) ([]ChangedRange, uint64, error)
Resolution is how far down the tree to go when working out which blocks have changed. Higher resolutions are faster but will give you back coarser results. 读取某两个版本之间变化的时间区间
func (*Quasar) QueryGeneration ¶
获取最新的版本号信息
func (*Quasar) QueryNearestValue ¶
func (q *Quasar) QueryNearestValue(id uuid.UUID, time int64, backwards bool, gen uint64) (qtree.Record, uint64, error)
查询最接近的数据点
func (*Quasar) QueryStatisticalValues ¶
func (q *Quasar) QueryStatisticalValues(id uuid.UUID, start int64, end int64, gen uint64, pointwidth uint8) ([]qtree.StatRecord, uint64, error)
读取某个时间区间的统计信息
func (*Quasar) QueryStatisticalValuesStream ¶
func (*Quasar) QueryValues ¶
func (q *Quasar) QueryValues(id uuid.UUID, start int64, end int64, gen uint64) ([]qtree.Record, uint64, error)
读取某个版本下某个时间区间的所有数据 These functions are the API. TODO add all the bounds checking on PW, and sanity on start/end
type QuasarConfig ¶
type QuasarConfig struct { //Measured in the number of datablocks //So 1000 is 8 MB cache DatablockCacheSize uint64 //This enables the grouping of value inserts //with a commit every Interval millis //If the number of stored values exceeds //EarlyTrip TransactionCoalesceEnable bool // 是否开启 TransactionCoalesce TransactionCoalesceInterval uint64 // 必须要提交的时间间隔 TransactionCoalesceEarlyTrip uint64 // 必须要提交的点的数量 ForestCount uint64 Params map[string]string }
Click to show internal directories.
Click to hide internal directories.