Documentation ¶
Index ¶
- type Option
- func WithAddrs(addrs ...string) Option
- func WithClient(client *clientv3.Client) Option
- func WithContext(ctx context.Context) Option
- func WithDialTimeout(dialTimeout time.Duration) Option
- func WithNamespace(namespace string) Option
- func WithRetryInterval(retryInterval time.Duration) Option
- func WithRetryTimes(retryTimes int) Option
- func WithTimeout(timeout time.Duration) Option
- type Registry
- func (r *Registry) Close() error
- func (r *Registry) Deregister(ctx context.Context, ins *registry.ServiceInstance) error
- func (r *Registry) Register(ctx context.Context, ins *registry.ServiceInstance) error
- func (r *Registry) Services(ctx context.Context, serviceName string) ([]*registry.ServiceInstance, error)
- func (r *Registry) Watch(ctx context.Context, serviceName string) (registry.Watcher, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(o *options)
func WithDialTimeout ¶
WithDialTimeout 设置客户端拨号超时时间
func WithRetryInterval ¶
WithRetryInterval 设置心跳重试间隔时间
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶
func (*Registry) Deregister ¶
Deregister 解注册服务实例
Click to show internal directories.
Click to hide internal directories.