mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-26 06:04:05 -08:00
17 lines
310 B
Go
17 lines
310 B
Go
package tsdb
|
|
|
|
import "github.com/fabxc/tsdb/chunks"
|
|
|
|
type mockChunkReader struct {
|
|
chunk func(ref uint64) (chunks.Chunk, error)
|
|
close func() error
|
|
}
|
|
|
|
func (cr *mockChunkReader) Chunk(ref uint64) (chunks.Chunk, error) {
|
|
return cr.chunk(ref)
|
|
}
|
|
|
|
func (cr *mockChunkReader) Close() error {
|
|
return cr.close()
|
|
}
|