mirror of
https://github.com/prometheus/prometheus.git
synced 2026-05-28 04:02:21 -04:00
Merge pull request #134 from criteo-forks/master
Expose `Blocks()` on DB
This commit is contained in:
commit
87c01dd5fb
1 changed files with 7 additions and 0 deletions
7
db.go
7
db.go
|
|
@ -520,6 +520,13 @@ func validateBlockSequence(bs []DiskBlock) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (db *DB) Blocks() []DiskBlock {
|
||||
db.mtx.RLock()
|
||||
defer db.mtx.RUnlock()
|
||||
|
||||
return db.blocks
|
||||
}
|
||||
|
||||
// Close the partition.
|
||||
func (db *DB) Close() error {
|
||||
close(db.stopc)
|
||||
|
|
|
|||
Loading…
Reference in a new issue