bitcask: github.com/prologic/bitcask/internal Index | Files | Directories

package internal

import "github.com/prologic/bitcask/internal"

Index

Package Files

entry.go item.go utils.go version.go

Variables

var (
    // Version release version
    Version = "0.0.1"

    // Commit will be overwritten automatically by the build system
    Commit = "HEAD"
)

func DirSize Uses

func DirSize(path string) (int64, error)

DirSize returns the space occupied by the given `path` on disk on the current file system.

func Exists Uses

func Exists(path string) bool

Exists returns `true` if the given `path` on the current file system exists

func FullVersion Uses

func FullVersion() string

FullVersion returns the full version and commit hash

func GetDatafiles Uses

func GetDatafiles(path string) ([]string, error)

GetDatafiles returns a list of all data files stored in the database path given by `path`. All datafiles are identified by the the glob `*.data` and the basename is represented by an monotomic increasing integer.

func ParseIds Uses

func ParseIds(fns []string) ([]int, error)

ParseIds will parse a list of datafiles as returned by `GetDatafiles` and extract the id part and return a slice of ints.

type Entry Uses

type Entry struct {
    Checksum uint32
    Key      []byte
    Offset   int64
    Value    []byte
}

Entry represents a key/value in the database

func NewEntry Uses

func NewEntry(key, value []byte) Entry

NewEntry creates a new `Entry` with the given `key` and `value`

type Item Uses

type Item struct {
    FileID int   `json:"fileid"`
    Offset int64 `json:"offset"`
    Size   int64 `json:"size"`
}

Item represents the location of the value on disk. This is used by the internal Adaptive Radix Tree to hold an in-memory structure mapping keys to locations on disk of where the value(s) can be read from.

Directories

PathSynopsis
config
data
data/codec
index
mocks

Package internal imports 7 packages (graph) and is imported by 5 packages. Updated 2019-12-13. Refresh now. Tools for package owners.