kv

package
v1.4.8 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package kv supplies kv store

Index

Constants

This section is empty.

Variables

View Source
var ErrNotUnique = errors.New("kv result is not unique")

Functions

func Delete

func Delete(ctx context.Context, key string) (bool, error)

func Exist

func Exist(ctx context.Context, key string) (bool, error)

Exist get one kv, if can not get return false

func Get

func Get(ctx context.Context, key string) (*mvccpb.KeyValue, error)

Get get one kv

func List

func List(ctx context.Context, key string) ([]*mvccpb.KeyValue, int64, error)

Get get kv list

func Put

func Put(ctx context.Context, key string, value string) error

Put put kv

func PutBytes

func PutBytes(ctx context.Context, key string, value []byte) error

Put put kv

Types

This section is empty.

Jump to

Keyboard shortcuts

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