Documentation ¶
Index ¶
- type Option
- type Options
- type Registry
- func (r *Registry) Delete(key string) error
- func (r *Registry) Deregister(ctx context.Context, ins *discovery.ServiceInstance) error
- func (r *Registry) Get(key string) ([]byte, error)
- func (r *Registry) List(key string) (map[string][]byte, error)
- func (r *Registry) Register(ins *discovery.ServiceInstance) error
- func (r *Registry) Services(ctx context.Context, serviceName string) ([]*discovery.ServiceInstance, error)
- func (r *Registry) Set(key string, value string) error
- func (r *Registry) Watch(ctx context.Context, serviceName string, cb func([]*discovery.ServiceInstance)) (discovery.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 WithDeregisterCriticalServiceAfter ¶
WithDeregisterCriticalServiceAfter 设置健康检测失败后自动注销服务时间
func WithEnableHealthCheck ¶
WithEnableHealthCheck 设置是否启用健康检查
func WithHealthCheckInterval ¶
WithHealthCheckInterval 设置健康检查时间间隔
func WithHealthCheckTimeout ¶
WithHealthCheckTimeout 设置健康检查超时时间
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func (*Registry) Deregister ¶
Deregister 解注册服务实例
func (*Registry) Register ¶
func (r *Registry) Register(ins *discovery.ServiceInstance) error
Register 注册服务实例
Click to show internal directories.
Click to hide internal directories.