kv

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2021 License: Apache-2.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 DeleteBucket

func DeleteBucket(bucket string) error

func DeleteKey

func DeleteKey(bucket string, key []byte) 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

	DeleteKey(bucket string, key []byte) error

	DeleteBucket(bucket string) error
}

Jump to

Keyboard shortcuts

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