etcd

package
v0.0.0-...-7c81865 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ETCD_OP_GET = "GET"
	ETCD_OP_CAS = "CAS"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EtcdEngine

type EtcdEngine struct {
	// contains filtered or unexported fields
}

func NewEtcdEngine

func NewEtcdEngine(cert, key, ca string, eps []string) (*EtcdEngine, error)

func (*EtcdEngine) CAS

func (ee *EtcdEngine) CAS(key string, version int64, val []byte) (res int64, err error)

func (*EtcdEngine) Close

func (ee *EtcdEngine) Close()

func (*EtcdEngine) Del

func (ee *EtcdEngine) Del(key string) error

func (*EtcdEngine) Get

func (ee *EtcdEngine) Get(key string) (res []*store.KVPair, err error)

func (*EtcdEngine) RegisterWatcher

func (ee *EtcdEngine) RegisterWatcher(params interface{}, key string, watcher store.ChangeWatcher, eventType store.OpType)

func (*EtcdEngine) SetWithRelease

func (ee *EtcdEngine) SetWithRelease(key string, val []byte, ttl time.Duration, keepAlive bool) (err error)

ttl in seconds

Jump to

Keyboard shortcuts

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