etcd

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mutex

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

Mutex ...

func NewMutex

func NewMutex(client *clientv3.Client, key string, opts ...concurrency.SessionOption) (mutex *Mutex, err error)

NewMutex ...

func (*Mutex) Lock

func (mutex *Mutex) Lock(timeout time.Duration) (err error)

Lock ...

func (*Mutex) Unlock

func (mutex *Mutex) Unlock() (err error)

Unlock ...

type Watch

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

Watch A watch only tells the latest revision

func WatchPrefix

func WatchPrefix(client *etcdv3.Client, ctx context.Context, prefix string) (*Watch, error)

NewWatch ...

func (*Watch) C

func (w *Watch) C() chan *clientv3.Event

C ...

func (*Watch) Close

func (w *Watch) Close() error

Close close watch

func (*Watch) IncipientKeyValues

func (w *Watch) IncipientKeyValues() []*mvccpb.KeyValue

IncipientKeyValues incipient key and values

Jump to

Keyboard shortcuts

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