etcdv3

package
v0.2.1 Latest Latest
Warning

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

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

Documentation

Overview

Package etcdv3 provides an etcd version 3 registry

Index

Constants

This section is empty.

Variables

View Source
var (
	Name = "etcdv3"
)

Functions

This section is empty.

Types

type Cfg

type Cfg struct {
	Prefix   string   `json:"prefix"`
	Name     string   `json:"name"`
	Projects []string `json:"projects"`
}

type Registry

type Registry struct {
	Cfg Cfg
	sync.Mutex
	Client *etcdv3.Client `inject-expr:"$.Cfg.Name"`
	// contains filtered or unexported fields
}

func (*Registry) Close added in v0.1.27

func (e *Registry) Close()

func (*Registry) Deregister

func (e *Registry) Deregister(s *registry2.Service, opts ...registry2.DeregOpt) error

func (*Registry) GetService

func (e *Registry) GetService(name string, opts ...registry2.GetOpt) ([]*registry2.Service, error)

func (*Registry) Init

func (e *Registry) Init()

func (*Registry) ListService

func (e *Registry) ListService(opts ...registry2.ListOpt) ([]*registry2.Service, error)

func (*Registry) RegLoop

func (e *Registry) RegLoop(f func() *registry2.Service, opt ...registry2.RegOpt) error

func (*Registry) Register

func (e *Registry) Register(s *registry2.Service, opts ...registry2.RegOpt) error

func (*Registry) String

func (e *Registry) String() string

func (*Registry) Watch

func (e *Registry) Watch(service string, opts ...registry2.WatchOpt) (registry2.Watcher, error)

type Watcher

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

func (*Watcher) Next

func (w *Watcher) Next() (*registry.Result, error)

func (*Watcher) Stop

func (w *Watcher) Stop() error

Jump to

Keyboard shortcuts

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