Versions in this module Expand all Collapse all v0 v0.0.2 Dec 27, 2023 Changes in this version + const ArchiveInfoSize + const ByteSize + const Days + const Float64Size + const FloatSize + const Hours + const IntSize + const MaxCompressedPointSize + const MetadataSize + const Minutes + const PointSize + const Seconds + const Weeks + const Years + var BlockRangeSize = 16 + var CompressedArchiveInfoSize = 92 + FreeCompressedArchiveInfoSize + var CompressedMetadataSize = 28 + FreeCompressedMetadataSize + var DefaultPointsPerBlock = 7200 + var FreeCompressedArchiveInfoSize = 36 + var FreeCompressedMetadataSize = 16 + var Now = time.Now + var VersionSize = 1 + func Compare(file1 string, file2 string, now int, ignoreBuffer bool, quarantinesRaw string, ...) (msg string, err error) + func Debug(compress, bitsWrite bool) + func GenDataPointSlice() []dataPoint + func GenTestArchive(buf []byte, ret Retention) *archiveInfo + type AggregationMethod int + const Average + const First + const Last + const Max + const Min + const Mix + const Percentile + const Sum + const Unknown + func ParseAggregationMethod(am string) AggregationMethod + func (am AggregationMethod) String() string + type MixAggregationSpec struct + Method AggregationMethod + Percentile float32 + func (mas *MixAggregationSpec) String() string + type Options struct + Compressed bool + FLock bool + FlockType int + IgnoreNowOnWrite bool + InMemory bool + InMemoryContent []byte + MixAggregationSpecs []MixAggregationSpec + MixAvgCompressedPointSizes map[int][]float32 + OpenFileFlag *int + PointSize float32 + PointsPerBlock int + SIMV bool + Sparse bool + type Retention struct + func NewRetention(secondsPerPoint, numberOfPoints int) Retention + func ParseRetentionDef(retentionDef string) (*Retention, error) + func (r *Retention) MaxRetention() int + func (r *Retention) NumberOfPoints() int + func (r *Retention) SecondsPerPoint() int + func (r *Retention) SetAvgCompressedPointSize(size float32) + func (r *Retention) Size() int + func (r Retention) String() string + type Retentions []*Retention + func MustParseRetentionDefs(retentionDefs string) Retentions + func NewRetentionsNoPointer(r2 []Retention) Retentions + func ParseRetentionDefs(retentionDefs string) (Retentions, error) + func (r Retentions) Len() int + func (r Retentions) Swap(i, j int) + func (r1 Retentions) Equal(r2 Retentions) bool + type TimeSeries struct + func (ts *TimeSeries) FromTime() int + func (ts *TimeSeries) PointPointers() []*TimeSeriesPoint + func (ts *TimeSeries) Points() []TimeSeriesPoint + func (ts *TimeSeries) Step() int + func (ts *TimeSeries) String() string + func (ts *TimeSeries) UntilTime() int + func (ts *TimeSeries) Values() []float64 + type TimeSeriesPoint struct + Time int + Value float64 + type Whisper struct + Extended bool + NonFatalErrors []error + func Create(path string, retentions Retentions, aggregationMethod AggregationMethod, ...) (whisper *Whisper, err error) + func CreateWithOptions(path string, retentions Retentions, aggregationMethod AggregationMethod, ...) (whisper *Whisper, err error) + func Open(path string) (whisper *Whisper, err error) + func OpenWithOptions(path string, options *Options) (whisper *Whisper, err error) + func (dstw *Whisper) FillClassic(srcw *Whisper) error + func (dstw *Whisper) FillCompressed(srcw *Whisper) error + func (whisper *Whisper) AggregationMethod() AggregationMethod + func (whisper *Whisper) CheckEmpty(fromTime, untilTime int) (exist bool, err error) + func (whisper *Whisper) CheckIntegrity() error + func (whisper *Whisper) Close() error + func (whisper *Whisper) CompressTo(dstPath string) error + func (whisper *Whisper) Dump(all, showDecompressionInfo bool) + func (whisper *Whisper) Fetch(fromTime, untilTime int) (timeSeries *TimeSeries, err error) + func (whisper *Whisper) FetchByAggregation(fromTime, untilTime int, spec *MixAggregationSpec) (timeSeries *TimeSeries, err error) + func (whisper *Whisper) File() *os.File + func (whisper *Whisper) GetDiscardedPointsSinceOpen() uint32 + func (whisper *Whisper) HasMatchingConfigs(rets Retentions, aggr AggregationMethod, xff float32, options *Options) bool + func (whisper *Whisper) IsCompressed() bool + func (whisper *Whisper) MaxRetention() int + func (whisper *Whisper) MetadataSize() int + func (whisper *Whisper) Retentions() []Retention + func (whisper *Whisper) Size() int + func (whisper *Whisper) StartTime() int + func (whisper *Whisper) Update(value float64, timestamp int) (err error) + func (whisper *Whisper) UpdateConfig(rets Retentions, aggr AggregationMethod, xff float32, options *Options) (err error) + func (whisper *Whisper) UpdateMany(points []*TimeSeriesPoint) (err error) + func (whisper *Whisper) UpdateManyForArchive(points []*TimeSeriesPoint, targetRetention int) (err error) + func (whisper *Whisper) WriteHeaderCompressed() (err error) + func (whisper *Whisper) XFilesFactor() float32