etcd

package
v1.22.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2024 License: Zlib Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(conf config.Config, eps config.EndPoints, resol resolver.Resolver) (service.Client, error)

func NewClient3

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

func NewClientWith

func NewClientWith(cli *clientv3.Client, conf *config.Config) (service.Client, error)

func NewService

func NewService(cfg config.Config, points config.EndPoints, registry registry.Registry) (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 service.Key) ([]*service.Data, error)

Get Config interface

func (*Base) Set

func (base *Base) Set(data service.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 watch.Changed)

func (*Watcher) Stop added in v0.4.6

func (watcher *Watcher) Stop() error

func (*Watcher) Watch added in v0.4.6

func (watcher *Watcher) Watch(key watch.Key) (watch.Chan, error)

Jump to

Keyboard shortcuts

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