prometheus/storage/local/index/batch.go
Julius Volz 7e85711df0 Beginnings of a tiered index implementation.
This reintroduces a LevelDB-based metrics index.

Change-Id: I4111540301c52255a07b2f570761707a32f72c05
2014-11-25 17:02:00 +01:00

22 lines
315 B
Go

package index
import (
"github.com/syndtr/goleveldb/leveldb"
)
type batch struct {
batch *leveldb.Batch
}
func (b *batch) Put(key, value encodable) {
b.batch.Put(key.encode(), value.encode())
}
func (b *batch) Delete(k encodable) {
b.batch.Delete(k.encode())
}
func (b *batch) Reset() {
b.batch.Reset()
}