Documentation
¶
Index ¶
- Constants
- type KVStore
- func (kv *KVStore) Close() error
- func (kv *KVStore) Delete(ctx context.Context, bucket, key string) error
- func (kv *KVStore) DeleteBucket(ctx context.Context, bucket string) error
- func (kv *KVStore) Get(ctx context.Context, bucketName, key string) ([]byte, error)
- func (kv *KVStore) Put(ctx context.Context, bucket, key string, value []byte) error
- type OptionFunc
Constants ¶
View Source
const (
DefaultFileName = "configkv.db"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KVStore ¶
func NewKVStore ¶
func NewKVStore(dbdir string, options ...OptionFunc) (*KVStore, error)
func (*KVStore) DeleteBucket ¶
type OptionFunc ¶
type OptionFunc func(*KVStore)
func WithDBName ¶
func WithDBName(name string) OptionFunc
func WithLogger ¶
func WithLogger(l *zap.Logger) OptionFunc
Click to show internal directories.
Click to hide internal directories.