store

package
v0.1.0-beta1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2018 License: Apache-2.0 Imports: 3 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Prefix    string
	Endpoints []string
	KeyFile   string
	CertFile  string
	CAFile    string
	Codec     serializer.Codec
}

type DestroyFunc

type DestroyFunc func()

type Store

type Store interface {
	Info(ctx context.Context, key string) (*types.Runtime, error)
	Count(ctx context.Context, key, keyRegexFilter string) (int, error)
	Put(ctx context.Context, key string, obj, out interface{}, ttl uint64) error
	Get(ctx context.Context, key string, objPtr interface{}, rev *int64) error
	List(ctx context.Context, key, filter string, listObjPtr interface{}, rev *int64) error
	Map(ctx context.Context, key, filter string, mapObj interface{}, rev *int64) error
	Set(ctx context.Context, key string, obj, outPtr interface{}, ttl uint64, force bool, rev *int64) error
	Del(ctx context.Context, key string) error
	Watch(ctx context.Context, key, filter string, rev *int64) (types.Watcher, error)
	Begin(ctx context.Context) TX
	Decode(ctx context.Context, value []byte, out interface{}) error
}

type TX

type TX interface {
	Put(key string, obj interface{}, ttl uint64) error
	Set(key string, obj interface{}, ttl uint64, force bool) error
	Del(key string)
	Commit() error
}

Jump to

Keyboard shortcuts

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