WriteStorage represents all the remote write storage.
| 58 | |
| 59 | // WriteStorage represents all the remote write storage. |
| 60 | type 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. |
| 84 | func NewWriteStorage(logger *slog.Logger, reg prometheus.Registerer, dir string, flushDeadline time.Duration, sm ReadyScrapeManager, enableTypeAndUnitLabels bool) *WriteStorage { |
nothing calls this directly
no outgoing calls
no test coverage detected