zookeeper

package module
v2.0.0-...-7571109 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 9 Imported by: 14

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrWatcherStopped = errors.New("watcher stopped")

Functions

This section is empty.

Types

type Option

type Option func(o *options)

Option is etcd registry option.

func WithDigestACL

func WithDigestACL(user string, password string) Option

WithDigestACL with registry password.

func WithRootPath

func WithRootPath(path string) Option

WithRootPath with registry root path.

type Registry

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

Registry is consul registry

func New

func New(conn *zk.Conn, opts ...Option) *Registry

func (*Registry) Deregister

func (r *Registry) Deregister(ctx context.Context, service *registry.ServiceInstance) error

Deregister registry service to zookeeper.

func (*Registry) GetService

func (r *Registry) GetService(_ context.Context, serviceName string) ([]*registry.ServiceInstance, error)

GetService get services from zookeeper

func (*Registry) Register

func (r *Registry) Register(_ context.Context, service *registry.ServiceInstance) error

func (*Registry) Watch

func (r *Registry) Watch(ctx context.Context, serviceName string) (registry.Watcher, error)

Jump to

Keyboard shortcuts

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