MCPcopy
hub / github.com/prometheus/prometheus / WriteStorage

Struct WriteStorage

storage/remote/write.go:60–81  ·  view source on GitHub ↗

WriteStorage represents all the remote write storage.

Source from the content-addressed store, hash-verified

58
59// WriteStorage represents all the remote write storage.
60type WriteStorage struct {
61 logger *slog.Logger
62 reg prometheus.Registerer
63 mtx sync.Mutex
64
65 watcherMetrics *wlog.WatcherMetrics
66 liveReaderMetrics *wlog.LiveReaderMetrics
67 externalLabels labels.Labels
68 dir string
69 queues map[string]*QueueManager
70 samplesIn *ewmaRate
71 flushDeadline time.Duration
72 interner *pool
73 scraper ReadyScrapeManager
74 quit chan struct{}
75
76 recordBuf *record.BuffersPool
77
78 // For timestampTracker.
79 highestTimestamp *maxTimestamp
80 enableTypeAndUnitLabels bool
81}
82
83// NewWriteStorage creates and runs a WriteStorage.
84func NewWriteStorage(logger *slog.Logger, reg prometheus.Registerer, dir string, flushDeadline time.Duration, sm ReadyScrapeManager, enableTypeAndUnitLabels bool) *WriteStorage {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected