mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
Expose a Querier with manually passed in readers.
Allows people to not copy the querying code. Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
This commit is contained in:
parent
7438ed7035
commit
5b242f35ba
12
querier.go
12
querier.go
|
@ -128,6 +128,18 @@ func (q *querier) Close() error {
|
||||||
return merr.Err()
|
return merr.Err()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NewBlockQuerier returns a queries against the readers.
|
||||||
|
func NewBlockQuerier(ir IndexReader, cr ChunkReader, tr TombstoneReader, mint, maxt int64) Querier {
|
||||||
|
return &blockQuerier{
|
||||||
|
index: ir,
|
||||||
|
chunks: cr,
|
||||||
|
tombstones: tr,
|
||||||
|
|
||||||
|
mint: mint,
|
||||||
|
maxt: maxt,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// blockQuerier provides querying access to a single block database.
|
// blockQuerier provides querying access to a single block database.
|
||||||
type blockQuerier struct {
|
type blockQuerier struct {
|
||||||
index IndexReader
|
index IndexReader
|
||||||
|
|
Loading…
Reference in a new issue