diff --git a/storage/metric/tiered.go b/storage/metric/tiered.go index 5dc1e99f3..33acf4435 100644 --- a/storage/metric/tiered.go +++ b/storage/metric/tiered.go @@ -62,6 +62,11 @@ type Storage interface { Drain() Flush() Close() + + // MetricPersistence proxy methods. + GetAllMetricNames() ([]string, error) + GetFingerprintsForLabelSet(model.LabelSet) (model.Fingerprints, error) + GetMetricForFingerprint(model.Fingerprint) (m *model.Metric, err error) } func NewTieredStorage(appendToMemoryQueueDepth, appendToDiskQueueDepth, viewQueueDepth uint, flushMemoryInterval, writeMemoryInterval, memoryTTL time.Duration, root string) Storage { @@ -520,3 +525,18 @@ func (t *tieredStorage) loadChunkAroundTime(iterator *levigo.Iterator, frontier return } + +func (t *tieredStorage) GetAllMetricNames() ([]string, error) { + // TODO: handle memory persistence as well. + return t.diskStorage.GetAllMetricNames() +} + +func (t *tieredStorage) GetFingerprintsForLabelSet(labelSet model.LabelSet) (model.Fingerprints, error) { + // TODO: handle memory persistence as well. + return t.diskStorage.GetFingerprintsForLabelSet(labelSet) +} + +func (t *tieredStorage) GetMetricForFingerprint(f model.Fingerprint) (m *model.Metric, err error) { + // TODO: handle memory persistence as well. + return t.diskStorage.GetMetricForFingerprint(f) +}