From 9445ccbad39d1feb2a864d83d6d50b2799183b3d Mon Sep 17 00:00:00 2001 From: Jason Wilder Date: Tue, 16 May 2017 11:18:02 -0600 Subject: [PATCH] Expose shard meta info on Shard --- tsdb/shard.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tsdb/shard.go b/tsdb/shard.go index 2c620dfe0f1..7de022cf498 100644 --- a/tsdb/shard.go +++ b/tsdb/shard.go @@ -187,6 +187,21 @@ func (s *Shard) SetEnabled(enabled bool) { s.mu.Unlock() } +// ID returns the shards ID. +func (s *Shard) ID() uint64 { + return s.id +} + +// Database returns the database of the shard. +func (s *Shard) Database() string { + return s.database +} + +// RetentionPolicy returns the retention policy of the shard. +func (s *Shard) RetentionPolicy() string { + return s.retentionPolicy +} + // ShardStatistics maintains statistics for a shard. type ShardStatistics struct { WriteReq int64