package
1.5.3
Repository: https://github.com/v2e4lisp/badger.git
Documentation: pkg.go.dev

# Functions

AssertTrue asserts that b is true.
AssertTruef is AssertTrue with extra info.
Check logs fatal if err != nil.
Check2 acts as convenience wrapper around Check, using the 2nd argument as error.
CompareKeys checks the key without timestamp and checks the timestamp if keyNoTs is same.
Copy copies a byte slice and returns the copied slice.
CreateSyncedFile creates a new file (using O_EXCL), errors if it already existed.
KeyWithTs generates a new key by appending ts to key.
Madvise uses the madvise system call to give advise about the use of memory when using a slice that is memory-mapped to a file.
Mmap uses the mmap system call to memory-map a file.
Munmap unmaps a previously mapped slice.
NewCloser constructs a new Closer, with an initial count on the WaitGroup.
NewMergeIterator returns a new MergeIterator from a list of Iterators.
OpenExistingFile opens an existing file, errors if it doesn't exist.
OpenSyncedFile creates the file if one doesn't exist.
OpenTruncFile opens the file with O_RDWR | O_CREATE | O_TRUNC.
ParseKey parses the actual key from the key bytes.
ParseTs parses the timestamp from the key bytes.
SafeCopy does append(a[:0], src...).
SameKey checks for key equality ignoring the version timestamp suffix.
Wrap wraps errors from external lib.
Wrapf is Wrap with extra info.

# Constants

ReadOnly opens the underlying file on a read-only basis.
Sync indicates that O_DSYNC should be set on the underlying file, ensuring that data writes do not return until the data is flushed to disk.

# Variables

CastagnoliCrcTable is a CRC32 polynomial table.
ErrEOF indicates an end of file when trying to read from a memory mapped file and encountering the end of slice.
LSMSize has size of the LSM in bytes.
NumBlockedPuts is number of blocked puts.
NumBytesRead has cumulative number of bytes read.
NumBytesWritten has cumulative number of bytes written.
NumGets is number of gets.
NumLSMBloomHits is number of LMS bloom hits.
NumLSMGets is number of LMS gets.
NumMemtableGets is number of memtable gets.
NumPuts is number of puts.
NumReads has cumulative number of reads.
NumWrites has cumulative number of writes.
PendingWrites tracks the number of pending writes.
VlogSize has size of the value log in bytes.

# Structs

Closer holds the two things we need to close a goroutine and wait for it to finish: a chan to tell the goroutine to shut down, and a WaitGroup with which to wait for it to finish shutting down.
MergeIterator merges multiple iterators.
Slice holds a reusable buf, will reallocate if you request a larger size than ever before.
ValueStruct represents the value info that can be associated with a key, but also the internal Meta field.
No description provided by the author

# Interfaces

Iterator is an interface for a basic iterator.