Documentation ¶
Index ¶
- Constants
- Variables
- func New(file string, configBytes []byte, log logging.Logger, _ string, ...) (database.Database, error)
- type Config
- type Database
- func (db *Database) Close() error
- func (db *Database) Compact(start []byte, end []byte) error
- func (db *Database) Delete(key []byte) error
- func (db *Database) Get(key []byte) ([]byte, error)
- func (db *Database) Has(key []byte) (bool, error)
- func (db *Database) HealthCheck(_ context.Context) (interface{}, error)
- func (db *Database) NewBatch() database.Batch
- func (db *Database) NewIterator() database.Iterator
- func (db *Database) NewIteratorWithPrefix(prefix []byte) database.Iterator
- func (db *Database) NewIteratorWithStart(start []byte) database.Iterator
- func (db *Database) NewIteratorWithStartAndPrefix(start, prefix []byte) database.Iterator
- func (db *Database) Put(key []byte, value []byte) error
Constants ¶
View Source
const (
Name = "pebble"
)
Variables ¶
View Source
var ( DefaultConfig = Config{ CacheSize: defaultCacheSize, BytesPerSync: 512 * units.KiB, WALBytesPerSync: 0, MemTableStopWritesThreshold: 8, MemTableSize: defaultCacheSize / 4, MaxOpenFiles: 4096, MaxConcurrentCompactions: 1, } DefaultConfigBytes []byte )
Functions ¶
Types ¶
type Config ¶
type Config struct { CacheSize int `json:"cacheSize"` BytesPerSync int `json:"bytesPerSync"` WALBytesPerSync int `json:"walBytesPerSync"` // 0 means no background syncing MemTableStopWritesThreshold int `json:"memTableStopWritesThreshold"` MemTableSize int `json:"memTableSize"` MaxOpenFiles int `json:"maxOpenFiles"` MaxConcurrentCompactions int `json:"maxConcurrentCompactions"` }
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func (*Database) HealthCheck ¶
func (*Database) NewIterator ¶
func (*Database) NewIteratorWithPrefix ¶
func (*Database) NewIteratorWithStart ¶
func (*Database) NewIteratorWithStartAndPrefix ¶
Click to show internal directories.
Click to hide internal directories.