etcd

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: MulanPSL-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Auth

func Auth(username, password string) registry.Option

Auth allows you to specify username/password

func GetStructTagName

func GetStructTagName(pointer interface{}) []string

GetStructTagName 获取struct的field的tag内容

func NewRegistry

func NewRegistry(opts ...registry.Option) registry.Registry

Types

type Registry

type Registry struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*Registry) BlockingQuery

func (e *Registry) BlockingQuery(targetPointer interface{}, prefix interface{}, call func(value interface{}))

func (*Registry) Delete

func (e *Registry) Delete(key string) (err error)

func (*Registry) Deregister

func (e *Registry) Deregister(s *registry.Service) error

func (*Registry) Get

func (e *Registry) Get(key string) (rsp *registry.KVResult, err error)

func (*Registry) GetService

func (e *Registry) GetService(name string) ([]*registry.Service, error)

func (*Registry) Init

func (e *Registry) Init(opts ...registry.Option) error

func (*Registry) ListServices

func (e *Registry) ListServices() ([]*registry.Service, error)

func (*Registry) Options

func (e *Registry) Options() registry.Options

func (*Registry) Put

func (e *Registry) Put(key string, value interface{}) (err error)

func (*Registry) Register

func (e *Registry) Register(s *registry.Service, opts ...registry.RegisterOption) error

func (*Registry) String

func (e *Registry) String() string

func (*Registry) Watch

func (e *Registry) Watch(opts ...registry.WatchOption) (registry.Watcher, error)

Jump to

Keyboard shortcuts

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