etcdkv

package
v0.3.11 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultPrefix = "/caesar/kvstore/"
)

Functions

func MatchPrefix

func MatchPrefix() kvstore.Option

MatchPrefix is used for read, watch, delete.

func New

func New(opts ...kvstore.Option) (kvstore.KV, error)

func WatchKey

func WatchKey(key string) kvstore.Option

WatchKey is used for read, watch, delete.

func WithAddress

func WithAddress(a ...string) kvstore.Option

WithAddress sets the etcd address.

func WithAuth

func WithAuth(username, password string) kvstore.Option

Auth allows you to specify username/password.

func WithContext

func WithContext(ctx context.Context) kvstore.Option

WithContext sets the etcd address.

func WithDialTimeout

func WithDialTimeout(timeout time.Duration) kvstore.Option

WithDialTimeout set the time out for dialing to etcd.

func WithPrefix

func WithPrefix(p string) kvstore.Option

WithPrefix sets the key prefix to use.

Types

This section is empty.

Jump to

Keyboard shortcuts

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