Documentation ¶
Index ¶
- Variables
- type BoltStore
- func (b *BoltStore) Close() error
- func (b *BoltStore) Delete(key []byte, version uint64) error
- func (b *BoltStore) DeleteBatch(keys []*pb.KVMetadata) error
- func (b *BoltStore) Get(key []byte) ([]byte, error)
- func (b *BoltStore) GetMetadata(key []byte) (*pb.KVMetadata, error)
- func (b *BoltStore) GetWithMetadata(key []byte) ([]byte, *pb.KVMetadata, error)
- func (b *BoltStore) ListExpiredKeys(from uint64, until uint64) ([]*pb.KVMetadata, error)
- func (b *BoltStore) ListKeys(prefix []byte) ([]*pb.KVMetadata, error)
- func (b *BoltStore) Put(key []byte, value []byte, deadline uint64, version uint64) error
- func (b *BoltStore) Restore(r io.Reader) error
- func (b *BoltStore) WriteTo(out io.Writer) error
- type Options
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrKeyNotFound is an error indicating a given key does not exist ErrKeyNotFound = errors.New("not found") // ErrBucketNotFound is an error indicating the data store bucket does not exist ErrBucketNotFound = errors.New("bucket not found") // ErrTTLBucketNotFound is an error indicating the TTL index bucket does not exist ErrTTLBucketNotFound = errors.New("ttl bucket not found") // ErrMDBucketNotFound is an error indicating the metadata bucket does not exist ErrMDBucketNotFound = errors.New("metadata bucket not found") // ErrMDNotFound is an error indicating metadata for the given key does not exist ErrMDNotFound = errors.New("metadata not found") // ErrIndexOutdated is an error indicating that the supplied index is outdated ErrIndexOutdated = errors.New("index outdated") )
Functions ¶
This section is empty.
Types ¶
type BoltStore ¶
type BoltStore struct {
// contains filtered or unexported fields
}
func (*BoltStore) DeleteBatch ¶
func (b *BoltStore) DeleteBatch(keys []*pb.KVMetadata) error
func (*BoltStore) GetMetadata ¶
func (b *BoltStore) GetMetadata(key []byte) (*pb.KVMetadata, error)
func (*BoltStore) GetWithMetadata ¶
func (*BoltStore) ListExpiredKeys ¶
type Options ¶
type Options struct { // Path is the file path to the BoltDB to use Path string // BoltOptions contains any specific BoltDB options you might // want to specify [e.g. open timeout] BoltOptions *bolt.Options // NoSync causes the database to skip fsync calls after each // write to the log. This is unsafe, so it should be used // with caution. NoSync bool }
Click to show internal directories.
Click to hide internal directories.