Documentation ¶
Index ¶
- Constants
- Variables
- type Batch
- type LevelDBIterator
- type LevelDBStorageDriver
- func (levelDriver *LevelDBStorageDriver) Batch(batch *Batch) error
- func (levelDriver *LevelDBStorageDriver) Close() error
- func (levelDriver *LevelDBStorageDriver) Compact() error
- func (levelDriver *LevelDBStorageDriver) Get(keys [][]byte) ([][]byte, error)
- func (levelDriver *LevelDBStorageDriver) GetMatches(keys [][]byte) (StorageIterator, error)
- func (levelDriver *LevelDBStorageDriver) GetRange(min, max []byte) (StorageIterator, error)
- func (levelDriver *LevelDBStorageDriver) GetRanges(ranges [][2][]byte, direction int) (StorageIterator, error)
- func (levelDriver *LevelDBStorageDriver) Open() error
- func (levelDriver *LevelDBStorageDriver) OpenSnapshot(snapshotDirectory string) (StorageDriver, error)
- func (levelDriver *LevelDBStorageDriver) Recover() error
- func (levelDriver *LevelDBStorageDriver) Restore(storageDriver StorageDriver) error
- func (levelDriver *LevelDBStorageDriver) Snapshot(snapshotDirectory string, metadataPrefix []byte, metadata map[string]string) error
- type Op
- type OpList
- type PrefixedIterator
- func (prefixedIterator *PrefixedIterator) Error() error
- func (prefixedIterator *PrefixedIterator) Key() []byte
- func (prefixedIterator *PrefixedIterator) Next() bool
- func (prefixedIterator *PrefixedIterator) Prefix() []byte
- func (prefixedIterator *PrefixedIterator) Release()
- func (prefixedIterator *PrefixedIterator) Value() []byte
- type PrefixedStorageDriver
- func (psd *PrefixedStorageDriver) Batch(batch *Batch) error
- func (psd *PrefixedStorageDriver) Close() error
- func (psd *PrefixedStorageDriver) Compact() error
- func (psd *PrefixedStorageDriver) Get(keys [][]byte) ([][]byte, error)
- func (psd *PrefixedStorageDriver) GetMatches(keys [][]byte) (StorageIterator, error)
- func (psd *PrefixedStorageDriver) GetRange(start []byte, end []byte) (StorageIterator, error)
- func (psd *PrefixedStorageDriver) GetRanges(ranges [][2][]byte, direction int) (StorageIterator, error)
- func (psd *PrefixedStorageDriver) Open() error
- func (psd *PrefixedStorageDriver) OpenSnapshot(snapshotDirectory string) (StorageDriver, error)
- func (psd *PrefixedStorageDriver) Recover() error
- func (psd *PrefixedStorageDriver) Restore(storageDriver StorageDriver) error
- func (psd *PrefixedStorageDriver) Snapshot(snapshotDirectory string, metadataPrefix []byte, metadata map[string]string) error
- type StorageDriver
- type StorageIterator
Constants ¶
View Source
const ( PUT = iota DEL = iota FORWARD = iota BACKWARD = iota )
Variables ¶
View Source
var ( CopyBatchSize = 1000 CopyBatchMaxBytes = 5 * 1024 * 1024 // 5 MB )
Functions ¶
This section is empty.
Types ¶
type LevelDBIterator ¶
type LevelDBIterator struct {
// contains filtered or unexported fields
}
func (*LevelDBIterator) Error ¶
func (it *LevelDBIterator) Error() error
func (*LevelDBIterator) Key ¶
func (it *LevelDBIterator) Key() []byte
func (*LevelDBIterator) Next ¶
func (it *LevelDBIterator) Next() bool
func (*LevelDBIterator) Prefix ¶
func (it *LevelDBIterator) Prefix() []byte
func (*LevelDBIterator) Release ¶
func (it *LevelDBIterator) Release()
func (*LevelDBIterator) Value ¶
func (it *LevelDBIterator) Value() []byte
type LevelDBStorageDriver ¶
type LevelDBStorageDriver struct {
// contains filtered or unexported fields
}
func NewLevelDBStorageDriver ¶
func NewLevelDBStorageDriver(file string, options *opt.Options) *LevelDBStorageDriver
func (*LevelDBStorageDriver) Batch ¶
func (levelDriver *LevelDBStorageDriver) Batch(batch *Batch) error
func (*LevelDBStorageDriver) Close ¶
func (levelDriver *LevelDBStorageDriver) Close() error
func (*LevelDBStorageDriver) Compact ¶
func (levelDriver *LevelDBStorageDriver) Compact() error
func (*LevelDBStorageDriver) Get ¶
func (levelDriver *LevelDBStorageDriver) Get(keys [][]byte) ([][]byte, error)
func (*LevelDBStorageDriver) GetMatches ¶
func (levelDriver *LevelDBStorageDriver) GetMatches(keys [][]byte) (StorageIterator, error)
func (*LevelDBStorageDriver) GetRange ¶
func (levelDriver *LevelDBStorageDriver) GetRange(min, max []byte) (StorageIterator, error)
func (*LevelDBStorageDriver) GetRanges ¶
func (levelDriver *LevelDBStorageDriver) GetRanges(ranges [][2][]byte, direction int) (StorageIterator, error)
func (*LevelDBStorageDriver) Open ¶
func (levelDriver *LevelDBStorageDriver) Open() error
func (*LevelDBStorageDriver) OpenSnapshot ¶
func (levelDriver *LevelDBStorageDriver) OpenSnapshot(snapshotDirectory string) (StorageDriver, error)
func (*LevelDBStorageDriver) Recover ¶
func (levelDriver *LevelDBStorageDriver) Recover() error
func (*LevelDBStorageDriver) Restore ¶
func (levelDriver *LevelDBStorageDriver) Restore(storageDriver StorageDriver) error
type PrefixedIterator ¶
type PrefixedIterator struct {
// contains filtered or unexported fields
}
func NewPrefixedIterator ¶
func NewPrefixedIterator(iter StorageIterator, prefix []byte) *PrefixedIterator
func (*PrefixedIterator) Error ¶
func (prefixedIterator *PrefixedIterator) Error() error
func (*PrefixedIterator) Key ¶
func (prefixedIterator *PrefixedIterator) Key() []byte
func (*PrefixedIterator) Next ¶
func (prefixedIterator *PrefixedIterator) Next() bool
func (*PrefixedIterator) Prefix ¶
func (prefixedIterator *PrefixedIterator) Prefix() []byte
func (*PrefixedIterator) Release ¶
func (prefixedIterator *PrefixedIterator) Release()
func (*PrefixedIterator) Value ¶
func (prefixedIterator *PrefixedIterator) Value() []byte
type PrefixedStorageDriver ¶
type PrefixedStorageDriver struct {
// contains filtered or unexported fields
}
func NewPrefixedStorageDriver ¶
func NewPrefixedStorageDriver(prefix []byte, storageDriver StorageDriver) *PrefixedStorageDriver
func (*PrefixedStorageDriver) Batch ¶
func (psd *PrefixedStorageDriver) Batch(batch *Batch) error
func (*PrefixedStorageDriver) Close ¶
func (psd *PrefixedStorageDriver) Close() error
func (*PrefixedStorageDriver) Compact ¶
func (psd *PrefixedStorageDriver) Compact() error
func (*PrefixedStorageDriver) Get ¶
func (psd *PrefixedStorageDriver) Get(keys [][]byte) ([][]byte, error)
func (*PrefixedStorageDriver) GetMatches ¶
func (psd *PrefixedStorageDriver) GetMatches(keys [][]byte) (StorageIterator, error)
func (*PrefixedStorageDriver) GetRange ¶
func (psd *PrefixedStorageDriver) GetRange(start []byte, end []byte) (StorageIterator, error)
func (*PrefixedStorageDriver) GetRanges ¶
func (psd *PrefixedStorageDriver) GetRanges(ranges [][2][]byte, direction int) (StorageIterator, error)
func (*PrefixedStorageDriver) Open ¶
func (psd *PrefixedStorageDriver) Open() error
func (*PrefixedStorageDriver) OpenSnapshot ¶
func (psd *PrefixedStorageDriver) OpenSnapshot(snapshotDirectory string) (StorageDriver, error)
func (*PrefixedStorageDriver) Recover ¶
func (psd *PrefixedStorageDriver) Recover() error
func (*PrefixedStorageDriver) Restore ¶
func (psd *PrefixedStorageDriver) Restore(storageDriver StorageDriver) error
type StorageDriver ¶
type StorageDriver interface { Open() error Close() error Recover() error Compact() error Get([][]byte) ([][]byte, error) GetMatches([][]byte) (StorageIterator, error) GetRange([]byte, []byte) (StorageIterator, error) GetRanges([][2][]byte, int) (StorageIterator, error) Batch(*Batch) error Snapshot(snapshotDirectory string, metadataPrefix []byte, metadata map[string]string) error OpenSnapshot(snapshotDirectory string) (StorageDriver, error) Restore(storageDriver StorageDriver) error }
Click to show internal directories.
Click to hide internal directories.