2012-11-26 18:56:51 +00:00
|
|
|
package raw
|
2012-11-24 11:33:34 +00:00
|
|
|
|
2012-11-25 15:07:05 +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 {
|
2012-11-25 15:07:05 +00:00
|
|
|
Has(key coding.Encoder) (bool, error)
|
|
|
|
Get(key coding.Encoder) ([]byte, error)
|
2012-11-24 11:33:34 +00:00
|
|
|
GetAll() ([]Pair, error)
|
2012-11-25 15:07:05 +00:00
|
|
|
Drop(key coding.Encoder) error
|
|
|
|
Put(key, value coding.Encoder) error
|
2012-11-24 11:33:34 +00:00
|
|
|
Close() error
|
|
|
|
}
|