Versions in this module Expand all Collapse all v1 v1.0.0 Feb 27, 2023 Changes in this version + var BadgerStoreClass = reflect.TypeOf((*implBadgerStore)(nil)) + var DefaultKeyRotationDuration = time.Hour * 24 * 7 + var DefaultValueLogMaxEntries = uint32(1024 * 1024 * 1024) + var ErrInvalidTransactionInContext = errors.New("incompatible transaction in context") + var ErrTransactionCanceled = errors.New("transaction was canceled") + func FromDB(name string, db *badger.DB) *implBadgerStore + func New(name string, dataDir string, options ...Option) (*implBadgerStore, error) + func NewLogger(debug bool) badger.Logger + func NewTransaction(tx *badger.Txn, readOnly bool) fastfood.Transaction + func NewZapLogger(log *zap.Logger, debug bool) badger.Logger + func ObjectType() reflect.Type + type Option interface + func WithBaseLevelSize(value int64) Option + func WithBaseTableSize(value int64) Option + func WithBlockCacheSize(value int64) Option + func WithBlockSize(value int) Option + func WithBloomFalsePositive(value float64) Option + func WithChecksumVerificationMode(mode options.ChecksumVerificationMode) Option + func WithCompactL0OnClose() Option + func WithCompression(zstd bool) Option + func WithConcurrentRetryNum(value int) Option + func WithDataDir(dataDir string) Option + func WithDetectConflicts() Option + func WithEncryptionKey(storageKey []byte) Option + func WithInMemory() Option + func WithIndexCacheSize(value int64) Option + func WithKeyValueDir(dataDir string) Option + func WithLBypassLockGuard() Option + func WithLevelSizeMultiplier(value int) Option + func WithLmaxCompaction() Option + func WithLogger(debug bool) Option + func WithMaxLevels(value int) Option + func WithMaxPendingWrites(value int) Option + func WithMemTableSize(value int64) Option + func WithMetricsEnabled() Option + func WithNamespaceOffset(value int) Option + func WithNope() Option + func WithNumCompactors(value int) Option + func WithNumGoroutines(value int) Option + func WithNumLevelZeroTables(value int) Option + func WithNumLevelZeroTablesStall(value int) Option + func WithNumMemtables(value int) Option + func WithNumVersionsToKeep(num int) Option + func WithOpenTimeout(timeout time.Duration) Option + func WithReadOnly() Option + func WithSnappy() Option + func WithSyncWrites() Option + func WithTableSizeMultiplier(value int) Option + func WithVLogPercentile(value float64) Option + func WithValueLogFileSize(value int64) Option + func WithValueLogMaxEntries(value uint32) Option + func WithValueThreshold(threshold int64) Option + func WithVerifyValueChecksum() Option + func WithZapLogger(log *zap.Logger, debug bool) Option + type StoreOptions struct + ConcurrentRetryNum int + MaxPendingWrites int + OpenTimeout time.Duration + func DefaultStoreOptions() *StoreOptions + func OpenDatabase(dataDir string, options ...Option) (*badger.DB, *StoreOptions, error)