kvstore

package
v0.0.0-...-859fa4b Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultRetentionPeriod = 60 * 60 * 12

12 hrs would be the default one

Variables

View Source
var (
	ErrNotFound         = errors.New("record  not found")
	ErrConcurrentUpdate = errors.New("concurrent update")
)

Functions

This section is empty.

Types

type PutOption

type PutOption func(c *putConfig)

func WithTtl

func WithTtl(ttl int64) PutOption

func WithVersion

func WithVersion(version int64) PutOption

type Store

type Store interface {
	Get(ctx context.Context, key string) (*stream.FlowKeyValue, error)
	Put(ctx context.Context, key, value string, opts ...PutOption) error
	Delete(ctx context.Context, key string) error
}

func NewEtcdKVStore

func NewEtcdKVStore(cli *clientv3.Client) Store

Jump to

Keyboard shortcuts

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