Versions in this module Expand all Collapse all v1 v1.8.2 Nov 4, 2017 Changes in this version + const FingerprintTimeRangeDir + const FingerprintToMetricDir + const LabelNameToLabelValuesDir + const LabelPairToFingerprintsDir + var FingerprintMetricCacheSize = 10 * 1024 * 1024 + var FingerprintTimeRangeCacheSize = 5 * 1024 * 1024 + var LabelNameLabelValuesCacheSize = 10 * 1024 * 1024 + var LabelPairFingerprintsCacheSize = 20 * 1024 * 1024 + func DeleteFingerprintTimeRangeIndex(basePath string) error + func DeleteLabelNameLabelValuesIndex(basePath string) error + func DeleteLabelPairFingerprintIndex(basePath string) error + type Batch interface + Delete func(key encoding.BinaryMarshaler) error + Put func(key, value encoding.BinaryMarshaler) error + Reset func() + type FingerprintMetricIndex struct + func NewFingerprintMetricIndex(basePath string) (*FingerprintMetricIndex, error) + func (i *FingerprintMetricIndex) IndexBatch(mapping FingerprintMetricMapping) error + func (i *FingerprintMetricIndex) Lookup(fp model.Fingerprint) (metric model.Metric, ok bool, err error) + func (i *FingerprintMetricIndex) UnindexBatch(mapping FingerprintMetricMapping) error + type FingerprintMetricMapping map[model.Fingerprint]model.Metric + type FingerprintTimeRangeIndex struct + func NewFingerprintTimeRangeIndex(basePath string) (*FingerprintTimeRangeIndex, error) + func (i *FingerprintTimeRangeIndex) Lookup(fp model.Fingerprint) (firstTime, lastTime model.Time, ok bool, err error) + type KeyValueAccessor interface + Key func(encoding.BinaryUnmarshaler) error + Value func(encoding.BinaryUnmarshaler) error + type KeyValueStore interface + Close func() error + Commit func(b Batch) error + Delete func(key encoding.BinaryMarshaler) (bool, error) + ForEach func(func(kv KeyValueAccessor) error) error + Get func(key encoding.BinaryMarshaler, value encoding.BinaryUnmarshaler) (bool, error) + Has func(key encoding.BinaryMarshaler) (bool, error) + NewBatch func() Batch + Put func(key, value encoding.BinaryMarshaler) error + func NewLevelDB(o LevelDBOptions) (KeyValueStore, error) + type LabelNameLabelValuesIndex struct + func NewLabelNameLabelValuesIndex(basePath string) (*LabelNameLabelValuesIndex, error) + func (i *LabelNameLabelValuesIndex) IndexBatch(b LabelNameLabelValuesMapping) error + func (i *LabelNameLabelValuesIndex) Lookup(l model.LabelName) (values model.LabelValues, ok bool, err error) + func (i *LabelNameLabelValuesIndex) LookupSet(l model.LabelName) (values map[model.LabelValue]struct{}, ok bool, err error) + type LabelNameLabelValuesMapping map[model.LabelName]codable.LabelValueSet + type LabelPairFingerprintIndex struct + func NewLabelPairFingerprintIndex(basePath string) (*LabelPairFingerprintIndex, error) + func (i *LabelPairFingerprintIndex) IndexBatch(m LabelPairFingerprintsMapping) (err error) + func (i *LabelPairFingerprintIndex) Lookup(p model.LabelPair) (fps model.Fingerprints, ok bool, err error) + func (i *LabelPairFingerprintIndex) LookupSet(p model.LabelPair) (fps map[model.Fingerprint]struct{}, ok bool, err error) + type LabelPairFingerprintsMapping map[model.LabelPair]codable.FingerprintSet + type LevelDB struct + func (l *LevelDB) Close() error + func (l *LevelDB) Commit(b Batch) error + func (l *LevelDB) Delete(key encoding.BinaryMarshaler) (bool, error) + func (l *LevelDB) ForEach(cb func(kv KeyValueAccessor) error) error + func (l *LevelDB) Get(key encoding.BinaryMarshaler, value encoding.BinaryUnmarshaler) (bool, error) + func (l *LevelDB) Has(key encoding.BinaryMarshaler) (has bool, err error) + func (l *LevelDB) NewBatch() Batch + func (l *LevelDB) Put(key, value encoding.BinaryMarshaler) error + type LevelDBBatch struct + func (b *LevelDBBatch) Delete(key encoding.BinaryMarshaler) error + func (b *LevelDBBatch) Put(key, value encoding.BinaryMarshaler) error + func (b *LevelDBBatch) Reset() + type LevelDBOptions struct + CacheSizeBytes int + Path string