This commit is contained in:
2026-06-15 10:47:24 +00:00
parent ca125c99d2
commit 06823ee547
28 changed files with 1243 additions and 1383 deletions

24
qb.go
View File

@@ -24,6 +24,20 @@ const (
AggregateAvg byte = 4
)
type AtreeMeasureConsumer interface {
Feed(uint32, float64)
}
type PeriodsWriter interface {
Feed(uint32, float64)
FeedNoSend(uint32, float64)
Close() error
}
type WorkerMeasureConsumer interface {
FeedNoSend(uint32, float64)
}
type TimestampCompressor interface {
// (tmp, timestamp)
Evaluate([]byte, uint32) TimeEvaluationReport
@@ -37,12 +51,11 @@ type TimestampCompressor interface {
// (offset) => payload
Tail(int) []byte
CreateDecompressor() TimestampDecompressor
//Payload() []byte // для снапшота
// Offset() int
ReplaceBuffer([]byte)
WriteCommitedTo(io.Writer) error
FirstTimestamp() uint32
LastTimestamp() uint32
Until() uint32
CommitedSince() uint32
CommitedUntil() uint32
ReplaceSinceWithUntil() uint32
}
@@ -67,7 +80,6 @@ type ValueCompressor interface {
Append(int, []byte, float64, uint64)
Size() int
CommitedSize() int
//Chunks() [][]byte
//DeleteLast()
CaptureState()
ForgetCapturedState()
@@ -75,8 +87,6 @@ type ValueCompressor interface {
Tail(int) []byte
// fracDigits
CreateDecompressor(MetricType, byte) ValueDecompressor
//Payload() []byte // для снапшота
//Offset() int
ReplaceBuffer([]byte)
WriteCommitedTo(io.Writer) error
LastValue() float64