mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-09 23:24:05 -08:00
Merge pull request #144 from Gouthamve/misc-
Expose NewIndexReader() and cleanups
This commit is contained in:
commit
643563068b
5
block.go
5
block.go
|
@ -64,11 +64,6 @@ type Appendable interface {
|
|||
Appender() Appender
|
||||
}
|
||||
|
||||
// Queryable defines an entity which provides a Querier.
|
||||
type Queryable interface {
|
||||
Querier(mint, maxt int64) Querier
|
||||
}
|
||||
|
||||
// BlockMeta provides meta information about a block.
|
||||
type BlockMeta struct {
|
||||
// Unique identifier for the block and its contents. Changes on compaction.
|
||||
|
|
3
db.go
3
db.go
|
@ -165,8 +165,7 @@ func Open(dir string, l log.Logger, r prometheus.Registerer, opts *Options) (db
|
|||
return nil, err
|
||||
}
|
||||
if l == nil {
|
||||
l = log.NewLogfmtLogger(os.Stdout)
|
||||
l = log.With(l, "ts", log.DefaultTimestampUTC, "caller", log.DefaultCaller)
|
||||
l = log.NewNopLogger()
|
||||
}
|
||||
if opts == nil {
|
||||
opts = DefaultOptions
|
||||
|
|
3
index.go
3
index.go
|
@ -570,6 +570,9 @@ var (
|
|||
errInvalidFlag = fmt.Errorf("invalid flag")
|
||||
)
|
||||
|
||||
// NewIndexReader returns a new IndexReader on the given directory.
|
||||
func NewIndexReader(dir string) (IndexReader, error) { return newIndexReader(dir) }
|
||||
|
||||
// newIndexReader returns a new indexReader on the given directory.
|
||||
func newIndexReader(dir string) (*indexReader, error) {
|
||||
f, err := openMmapFile(filepath.Join(dir, "index"))
|
||||
|
|
Loading…
Reference in a new issue