Documentation
¶
Index ¶
- type Batch
- type Configuration
- func (c *Configuration) Options(opts ...driver.Option) map[string]struct{}
- func (c *Configuration) SetBlockCacheCapacity(n int) driver.Option
- func (c *Configuration) SetBlockSize(n int) driver.Option
- func (c *Configuration) SetCompactionTableSize(n int) driver.Option
- func (c *Configuration) SetCompactionTotalSize(n int) driver.Option
- func (c *Configuration) SetDisableSeeksCompaction(b bool) driver.Option
- func (c *Configuration) SetNoSync(b bool) driver.Option
- func (c *Configuration) SetOpenFilesCacheCapacity(n int) driver.Option
- func (c *Configuration) SetWriteBuffer(n int) driver.Option
- type Driver
- type Iterator
- func (i *Iterator) Close() error
- func (i *Iterator) Error() error
- func (i *Iterator) Key() []byte
- func (i *Iterator) Last() bool
- func (i *Iterator) Next() bool
- func (i *Iterator) Prev() bool
- func (i *Iterator) Seek(key driver.Key) bool
- func (i *Iterator) Valid() bool
- func (i *Iterator) Value() []byte
- type LevelDB
- func (l *LevelDB) Close() error
- func (l *LevelDB) CreateField(spec driver.FieldSpec) ([]byte, error)
- func (l *LevelDB) CreateIndex(spec driver.IndexSpec) ([]byte, error)
- func (l *LevelDB) DefaultFieldKey() []byte
- func (l *LevelDB) DefaultIndexKey() []byte
- func (l *LevelDB) Delete(key driver.Key) error
- func (l *LevelDB) Get(key driver.Key) ([]byte, error)
- func (l *LevelDB) GetSchemaSpec() (driver.SchemaSpec, error)
- func (l *LevelDB) GetSnapshot() (driver.Snapshot, error)
- func (l *LevelDB) Has(key driver.Key) (bool, error)
- func (l *LevelDB) InitSchema() error
- func (l *LevelDB) NewBatch() driver.Batching
- func (l *LevelDB) Put(key driver.Key, value driver.Value) error
- func (l *LevelDB) RenameIndex(oldName, newName string) (bool, error)
- func (l *LevelDB) Search(query driver.Query) driver.Cursor
- type Snapshot
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
func (*Configuration) Options ¶
func (c *Configuration) Options(opts ...driver.Option) map[string]struct{}
func (*Configuration) SetBlockCacheCapacity ¶
func (c *Configuration) SetBlockCacheCapacity(n int) driver.Option
SetBlockCacheCapacity defines the block cache capacity.
func (*Configuration) SetBlockSize ¶
func (c *Configuration) SetBlockSize(n int) driver.Option
SetBlockSize defines the minimum uncompressed size of each sorted table.
func (*Configuration) SetCompactionTableSize ¶
func (c *Configuration) SetCompactionTableSize(n int) driver.Option
SetCompactionTableSize limits size of sorted table.
func (*Configuration) SetCompactionTotalSize ¶
func (c *Configuration) SetCompactionTotalSize(n int) driver.Option
SetCompactionTotalSize limits total size of sorted table for each level.
func (*Configuration) SetDisableSeeksCompaction ¶
func (c *Configuration) SetDisableSeeksCompaction(b bool) driver.Option
SetDisableSeeksCompaction toggles the seek driven compactions feature on leveldb.
func (*Configuration) SetNoSync ¶
func (c *Configuration) SetNoSync(b bool) driver.Option
SetNoSync allows completely disable fsync on leveldb.
func (*Configuration) SetOpenFilesCacheCapacity ¶
func (c *Configuration) SetOpenFilesCacheCapacity(n int) driver.Option
SetOpenFilesCacheCapacity defines the upper bound of open files that the localstore should maintain at any point of time.
func (*Configuration) SetWriteBuffer ¶
func (c *Configuration) SetWriteBuffer(n int) driver.Option
SetWriteBuffer defines the size of writer buffer.
type Driver ¶
type Driver struct{}
Driver is exported to make the driver directly accessible. In general the driver is used via the shed/driver package.
type LevelDB ¶
type LevelDB struct {
// contains filtered or unexported fields
}
func (*LevelDB) DefaultFieldKey ¶
func (*LevelDB) DefaultIndexKey ¶
func (*LevelDB) GetSchemaSpec ¶
func (l *LevelDB) GetSchemaSpec() (driver.SchemaSpec, error)