etcd

package
v0.0.0-...-a7a8f6c Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2022 License: Apache-2.0 Imports: 4 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(*options)

Option option

func WithGroup

func WithGroup(value string) Option

WithGroup set group

func WithLease

func WithLease(value int64) Option

WithLease set lease ttl, unit is seconds

type Registry

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

Registry etcd registry

func NewRegistry

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

NewRegistry returns a etcd registry

func (*Registry) Register

func (r *Registry) Register(addr string) error

Register register the addr to etcd, and keepalive with a lease

Jump to

Keyboard shortcuts

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