Documentation
¶
Overview ¶
Package common provides the deliberately small Pebble surface used by immutable collection index artifacts.
Index ¶
- Variables
- type Batch
- type Iterator
- type Options
- type PebbleLogger
- type Store
- func (s *Store) Checkpoint(path string) error
- func (s *Store) Close() error
- func (s *Store) Compact(start, end []byte) error
- func (s *Store) Delete(key []byte) error
- func (s *Store) Destroy() error
- func (s *Store) Flush() error
- func (s *Store) Get(key []byte) ([]byte, error)
- func (s *Store) NewBatch() *Batch
- func (s *Store) NewPrefixIterator(prefix []byte) (*Iterator, error)
- func (s *Store) NewRangeIterator(lower, upper []byte) (*Iterator, error)
- func (s *Store) Set(key, value []byte) error
Constants ¶
This section is empty.
Variables ¶
var ( // ErrNotFound identifies a missing key. ErrNotFound = pebble.ErrNotFound // ErrClosed identifies an operation on a closed store, batch, or iterator. ErrClosed = errors.New("indexstore: closed") // ErrReadOnly identifies a mutation attempted through a read-only store. ErrReadOnly = errors.New("indexstore: read-only") )
Functions ¶
This section is empty.
Types ¶
type Batch ¶
type Batch struct {
// contains filtered or unexported fields
}
Batch is an atomic group of mutations.
type Iterator ¶
type Iterator struct {
// contains filtered or unexported fields
}
Iterator traverses one immutable Pebble view in byte-key order.
type PebbleLogger ¶
type PebbleLogger struct{}
PebbleLogger discards Pebble's internal log messages.
func (PebbleLogger) Errorf ¶
func (PebbleLogger) Errorf(string, ...interface{})
func (PebbleLogger) Fatalf ¶
func (PebbleLogger) Fatalf(format string, args ...interface{})
func (PebbleLogger) Infof ¶
func (PebbleLogger) Infof(string, ...interface{})
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is a Pebble database rooted at one directory.
func Open ¶
Open opens or creates a Pebble store. Existing symbolic-link paths are rejected before Pebble can follow them.
func (*Store) Checkpoint ¶
Checkpoint creates a point-in-time Pebble directory at path.
func (*Store) Destroy ¶
Destroy closes the database and removes its exact directory. It may be called only once and is unavailable for read-only stores.
func (*Store) NewPrefixIterator ¶
NewPrefixIterator creates an iterator over all keys beginning with prefix.
func (*Store) NewRangeIterator ¶
NewRangeIterator creates an iterator over the half-open range [lower, upper). A nil bound leaves that side of the range unbounded.