etcd

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: Zlib Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(sn server.Node, eps server.EndPoints) (service.Client, error)

func NewClient3

func NewClient3(eps *server.EndPoints, timeout int) (*clientv3.Client, error)

func NewClientWith

func NewClientWith(cli *clientv3.Client, sn server.Node) (service.Client, error)

func NewService

func NewService(cfg config.Config, points server.EndPoints) (service.Service, error)

NewService 注册一个服务

func NewServiceWith

func NewServiceWith(cli *clientV3.Client, cfg config.Config) (service.Service, error)

Types

type Base

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

func (*Base) AttachWatcher added in v0.2.3

func (base *Base) AttachWatcher(watcher *Watcher)

func (*Base) Get

func (base *Base) Get(key kv.Key) ([]*kv.Data, error)

Get Config interface

func (*Base) Set

func (base *Base) Set(data kv.Data) error

Set Config interface

type Watcher added in v0.2.3

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

func NewWatcher added in v0.2.3

func NewWatcher(client *clientv3.Client, sizeChan int) *Watcher

func (*Watcher) Changed added in v0.2.3

func (watcher *Watcher) Changed(cmd kv.Changed)

func (*Watcher) Watcher added in v0.2.3

func (watcher *Watcher) Watcher(key kv.Key) kv.WatchChan

Jump to

Keyboard shortcuts

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