pending

package
v0.0.0-...-a5b7e7e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const BitDelete byte = 1 << 0 // Set if the key has been deleted.

Variables

This section is empty.

Functions

func NoReadTracker

func NoReadTracker(_ []byte)

Types

type Item

type Item interface {
	Key() []byte
	KeyCopy(dst []byte) []byte
	Value(fn func(val []byte) error) error
	ValueCopy(dst []byte) ([]byte, error)
	IsDeletedOrExpired() bool
	ExpiresAt() uint64
	Version() uint64
}

type Iterator

type Iterator interface {
	Rewind()
	Next()
	Valid() bool
	Seek(key []byte)
	SeekLast()
	Key() []byte
	Item() Item
	Close()
}

type ReadTracker

type ReadTracker func(key []byte)

type Writes

type Writes interface {
	Iterator(prefix []byte, reversed bool) Iterator
	Get(key []byte) (Item, error)
	Set(e *badger.Entry)
	Delete(key []byte)
	Replay(fn func(e *badger.Entry) error) error
	Close() error
}

func New

func New(path string, tx *badger.Txn, maxCount, maxSize int64, threshold int, addReadKey ReadTracker) Writes

func NewWithDB

func NewWithDB(db *badger.DB, tx *badger.Txn, addReadKey ReadTracker) Writes

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL