kv

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddValue

func AddValue(bucket string, key []byte, value []byte) error

func AddValueCompress

func AddValueCompress(bucket string, key []byte, value []byte) error

func DeleteKey

func DeleteKey(bucket string, key []byte) error

func ExistsKey

func ExistsKey(bucket string, key []byte) (bool, error)

func GetCompressedValue

func GetCompressedValue(bucket string, key []byte) ([]byte, error)

func GetValue

func GetValue(bucket string, key []byte) ([]byte, error)

func Register

func Register(name string, h KVStore)

Types

type KVStore

type KVStore interface {
	Open() error

	Close() error

	GetValue(bucket string, key []byte) ([]byte, error)

	GetCompressedValue(bucket string, key []byte) ([]byte, error)

	AddValueCompress(bucket string, key []byte, value []byte) error

	AddValue(bucket string, key []byte, value []byte) error

	ExistsKey(bucket string, key []byte) (bool, error)

	DeleteKey(bucket string, key []byte) error
}

Jump to

Keyboard shortcuts

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