store

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrKeyNotExist = errors.New("key not exist")

Functions

func InitKvStore

func InitKvStore(cfg config.StoreConfig) (err error)

Types

type KVStore

type KVStore interface {
	Set(ctx context.Context, key string, value []byte) error
	Get(ctx context.Context, key string) ([]byte, error)
	Delete(ctx context.Context, key string) error
	Close() error
}

func GetKVStore

func GetKVStore() KVStore

func NewEtcdStore

func NewEtcdStore(endpoints []string, keyPrefix string) (KVStore, error)

func NewFileStore

func NewFileStore(fileName string) (KVStore, error)

func NewMemoryStore

func NewMemoryStore() KVStore

Jump to

Keyboard shortcuts

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