etcd

package module
v0.0.0-...-9d8ded8 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Etcd

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

Etcd is a client for https://etcd.io/.

func New

func New(o *Options) (*Etcd, error)

New returns a new Etcd.

func (*Etcd) Delete

func (e *Etcd) Delete(key string) error

Delete implements the kv.KV interface.

func (*Etcd) DeleteTree

func (e *Etcd) DeleteTree(prefix string) error

DeleteTree implements the kv.KV interface.

func (*Etcd) Exists

func (e *Etcd) Exists(key string) (bool, error)

Exists implements the kv.KV interface.

func (*Etcd) Get

func (e *Etcd) Get(key string) ([]byte, error)

Get implements the kv.KV interface.

func (*Etcd) List

func (e *Etcd) List(prefix string) (map[string][]byte, error)

List implements the kv.KV interface.

func (*Etcd) NewLocker

func (e *Etcd) NewLocker(key string) kv.Locker

NewLocker implements the kv.KV interface.

func (*Etcd) NewWatcher

func (e *Etcd) NewWatcher(prefix string) kv.Watcher

NewWatcher implements the kv.KV interface.

func (*Etcd) Put

func (e *Etcd) Put(key string, value []byte) error

Put implements the kv.KV interface.

type Locker

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

func (*Locker) Lock

func (l *Locker) Lock() error

Lock implements the kv.Locker interface.

func (*Locker) Unlock

func (l *Locker) Unlock() error

Unlock implements the kv.Locker interface.

type Options

type Options struct {
	Endpoints []string
	Username  string
	Password  string
}

Options is Etcd options.

type Watcher

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

func (*Watcher) Unwatch

func (w *Watcher) Unwatch() error

Unwatch implements the kv.Watcher interface.

func (*Watcher) Watch

func (w *Watcher) Watch() (<-chan map[string][]byte, error)

Watch implements the kv.Watcher interface.

Jump to

Keyboard shortcuts

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