Documentation ¶
Index ¶
- type Option
- func WithAddr(addr string) Option
- func WithClient(client *api.Client) Option
- func WithContext(ctx context.Context) Option
- func WithDeregisterCriticalServiceAfter(after int) Option
- func WithEnableHealthCheck(enable bool) Option
- func WithEnableHeartbeatCheck(enable bool) Option
- func WithHealthCheckInterval(interval int) Option
- func WithHealthCheckTimeout(timeout int) Option
- func WithHeartbeatCheckInterval(interval int) Option
- func WithMetaMap(metaMap map[string]string) Option
- type Registry
- func (r *Registry) Deregister(ctx context.Context, ins *registry.ServiceInstance) error
- func (r *Registry) GetMetaMap() map[string]string
- 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 WithDeregisterCriticalServiceAfter ¶
WithDeregisterCriticalServiceAfter 设置健康检测失败后自动注销服务时间
func WithEnableHealthCheck ¶
WithEnableHealthCheck 设置是否启用健康检查
func WithEnableHeartbeatCheck ¶
WithEnableHeartbeatCheck 设置是否启用心跳检查
func WithHealthCheckInterval ¶
WithHealthCheckInterval 设置健康检查时间间隔
func WithHealthCheckTimeout ¶
WithHealthCheckTimeout 设置健康检查超时时间
func WithHeartbeatCheckInterval ¶
WithHeartbeatCheckInterval 设置心跳检查时间间隔
func WithMetaMap ¶ added in v0.0.6
WithMetaMap 设置metaMap
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶
func (*Registry) Deregister ¶
Deregister 解注册服务实例
func (*Registry) GetMetaMap ¶ added in v0.0.6
Click to show internal directories.
Click to hide internal directories.