etcd

package module
v0.0.0-...-1561656 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(o *options)

func Context

func Context(ctx context.Context) Option

func MaxRetry

func MaxRetry(maxRetry int) Option

func Namespace

func Namespace(namespace string) Option

func TTL

func TTL(ttl time.Duration) Option

type Registry

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

func New

func New(client *clientv3.Client, opts ...Option) *Registry

func (*Registry) Deregister

func (r *Registry) Deregister(ctx context.Context, svc *registry.Service) error

func (*Registry) Get

func (r *Registry) Get(ctx context.Context, name string) ([]*registry.Service, error)

func (*Registry) Register

func (r *Registry) Register(ctx context.Context, svc *registry.Service) error

func (*Registry) Watch

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

Jump to

Keyboard shortcuts

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