Merge pull request #8393 from influxdata/jw-shard-status2

Expose shard meta info on Shard
pull/8396/head
Jason Wilder 2017-05-16 11:42:15 -06:00 committed by GitHub
commit aa8ea43bf8
1 changed files with 15 additions and 0 deletions

View File

@ -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