prometheus/persistence.go

20 lines
341 B
Go
Raw Normal View History

2012-11-24 11:33:34 +00:00
package main
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
}