kiwi

package module
v0.0.0-...-932458b Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultOptions = Options{
	IndexType: BPlusTree,
	ReadOnly:  false,
	FileMode:  0664,
	Log:       func(msg string, args ...interface{}) {},
}

DefaultOptions provides some sane defaults for initializing Kiwi DB.

Functions

This section is empty.

Types

type DB

type DB struct {
	// contains filtered or unexported fields
}

DB represents an instance of Kiwi database.

func Open

func Open(filePath string, opts *Options) (*DB, error)

Open opens the named file as Kiwi database and returns a DB instance for accessing it. If the file doesn't exist, it will be created and initialized if not in read-only mode.

func (*DB) Close

func (db *DB) Close() error

Close closes the underlying files and the indexers.

func (*DB) String

func (db *DB) String() string

type IndexType

type IndexType int

IndexType represents the type of the index to be used by Kiwi.

const (
	BPlusTree IndexType = 0
)

Indexing schemes supported.

type Options

type Options struct {
	IndexType IndexType
	ReadOnly  bool
	FileMode  os.FileMode
	Log       func(msg string, args ...interface{})
}

Options represents configuration settings for kiwi database.

Directories

Path Synopsis
cmd
Package index defines common interface and errors for indexing implementations to use.
Package index defines common interface and errors for indexing implementations to use.
bptree
Package bptree implements an on-disk B+ tree indexing scheme that can store key-value pairs and provide fast lookups and range scans.
Package bptree implements an on-disk B+ tree indexing scheme that can store key-value pairs and provide fast lookups and range scans.

Jump to

Keyboard shortcuts

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