kvs

package
v0.0.0-...-a53e0fd Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(db DB, e *Entry) error

func LoadEntries

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

func LoadEntry

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

func Store

func Store(db DB, e Entry) error

Types

type DB

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

func NewDB

func NewDB(db *badger.DB) (DB, error)

func NewMemDB

func NewMemDB() (DB, error)

func (DB) Close

func (db DB) Close() error

func (DB) DumpTo

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

func (DB) DumpToStdout

func (db DB) DumpToStdout() error

func (DB) GetSeq

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

func (DB) Update

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

func (DB) View

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

type Entry

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

func ConvertToBlankEntries

func ConvertToBlankEntries(tableName string, ownerID, rowID uint32, x interface{}) []Entry

func ConvertToBlankEntriesWithUUID

func ConvertToBlankEntriesWithUUID(tableName string, ownerID UUID, rowID uint32, x interface{}) []Entry

func ConvertToEntries

func ConvertToEntries(tableName string, ownerID, rowID uint32, x interface{}) []Entry

func ConvertToEntriesWithUUID

func ConvertToEntriesWithUUID(tableName string, ownerID UUID, rowID uint32, x interface{}) []Entry

func (Entry) Key

func (e Entry) Key() []byte

func (Entry) PrefixKey

func (e Entry) PrefixKey() []byte

type RootOwner

type RootOwner struct{}

func (RootOwner) String

func (o RootOwner) String() string

type UUID

type UUID interface {
	String() string
}

Jump to

Keyboard shortcuts

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