Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Registry ¶
type Registry interface {
// Register 服务注册
// serviceName string 服务名称
Register(serviceName string, meta metadata.ServiceRegisterMetadata) error
// Unregister 服务注销
// serviceName string 服务名称
Unregister(serviceName string) error
// OnStatusChange 注册状态变更回调
OnStatusChange(callback StatusChangeCallback)
// Close 关闭服务注册
Close() error
}
Registry 服务注册
type StatusChangeCallback ¶ added in v0.2.6
type StatusChangeCallback func(newMeta metadata.ServiceMetadata)
StatusChangeCallback is a callback function invoked when the service status is changed externally.
Click to show internal directories.
Click to hide internal directories.