MCPcopy
hub / github.com/influxdata/telegraf / DiskBuffer

Struct DiskBuffer

models/buffer_disk.go:18–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16)
17
18type DiskBuffer struct {
19 BufferStats
20 sync.Mutex
21
22 file *wal.Log
23 path string
24
25 batchFirst uint64 // Index of the first metric in the batch
26 batchSize uint64 // Number of metrics currently in the batch
27
28 // Ending point of metrics read from disk on telegraf launch.
29 // Used to know whether to discard tracking metrics.
30 originalEnd uint64
31
32 // The mask contains offsets of metric already removed during a previous
33 // transaction. Metrics at those offsets should not be contained in new
34 // batches.
35 mask []int
36}
37
38func NewDiskBuffer(id, path string, stats BufferStats, diskSync bool) (*DiskBuffer, error) {
39 filePath := filepath.Join(path, id)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected