kvs

package module
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: BSD-3-Clause-Clear Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareBytesToAny

func CompareBytesToAny(a []byte, i interface{}) bool

func Get

func Get(db KVDB, e *Entry) error

func LoadEntries

func LoadEntries(s interface{}, entries []Entry) error

func LoadEntry

func LoadEntry(s interface{}, entry Entry) error

func LoadID

func LoadID(s any, rowID uint32) error

func Store

func Store(db KVDB, e Entry) error

Types

type Entry

type Entry struct {
	TableName  string
	ColumnName string
	OwnerUUID  UUID
	RowID      uint32
	Data       []byte
	Meta       byte
}

func ConvertToBlankEntries

func ConvertToBlankEntries(tableName string, ownerID UUID, rowID uint32, x any) []Entry

func ConvertToEntries

func ConvertToEntries(tableName string, ownerID UUID, rowID uint32, x any) []Entry

func (Entry) Key

func (e Entry) Key() []byte

func (Entry) PrefixKey

func (e Entry) PrefixKey() []byte

type KVDB

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

func NewKVDB

func NewKVDB(db *badger.DB) (KVDB, error)

func NewMemKVDB

func NewMemKVDB() (KVDB, error)

func (KVDB) Close

func (db KVDB) Close() error

func (KVDB) DumpTo

func (db KVDB) DumpTo(w io.Writer) error

func (KVDB) DumpToStdout

func (db KVDB) DumpToStdout() error

func (KVDB) GetSeq

func (db KVDB) GetSeq(key []byte, bandwidth uint64) (*badger.Sequence, error)

func (KVDB) Update

func (db KVDB) Update(f func(txn *badger.Txn) error) error

func (KVDB) View

func (db KVDB) View(f func(txn *badger.Txn) error) error

type RootOwner

type RootOwner struct{}

func (RootOwner) String

func (o RootOwner) String() string

type UUID

type UUID interface {
	String() string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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