prometheus/storage/raw/interface.go

20 lines
340 B
Go
Raw Normal View History

package raw
2012-11-24 11:33:34 +00:00
import (
"github.com/matttproud/prometheus/coding"
)
2012-11-24 11:33:34 +00:00
type Pair struct {
Left []byte
Right []byte
}
type Persistence interface {
Has(key coding.Encoder) (bool, error)
Get(key coding.Encoder) ([]byte, error)
2012-11-24 11:33:34 +00:00
GetAll() ([]Pair, error)
Drop(key coding.Encoder) error
Put(key, value coding.Encoder) error
2012-11-24 11:33:34 +00:00
Close() error
}