Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConfigListener ¶ added in v0.3.12
ConfigListener 定义配置变更监听器
type Configor ¶
type Configor interface { // GetConfig 获取配置项的值 GetConfig(fname string) ([]byte, error) // SetConfig 设置配置项的值 SetConfig(fname string, payload []byte) error // DeleteConfig 删除配置项 DeleteConfig(fname string) error // WatchConfig 监听配置项的变化 WatchConfig(listener ConfigListener) error }
Configor 配置中心接口
type ConfigorBuilder ¶ added in v0.3.12
type ConfigorBuilder interface{ Build() Configor }
func LookupConfigor ¶ added in v0.3.12
func LookupConfigor(name string) (ConfigorBuilder, bool)
type Registry ¶
type Registry interface { // Register 注册服务实例 Register(instance *ServiceInstance) error // Deregister 注销服务实例 Deregister(instanceID string) error // Discover 发现服务实例 Discover(serviceName string) ([]*ServiceInstance, error) // Watch 监听服务实例的变化 Watch(serviceName string, callback func([]*ServiceInstance)) error }
Registry 注册中心接口
type RegistryBuilder ¶ added in v0.3.12
type RegistryBuilder interface{ Build() Registry }
func LookupRegister ¶ added in v0.3.12
func LookupRegister(name string) (RegistryBuilder, bool)
Click to show internal directories.
Click to hide internal directories.