Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsulClient ¶
type ConsulClient struct {
// contains filtered or unexported fields
}
ConsulClient 是实现 RegistryClient 接口的结构体
func (*ConsulClient) GetServiceURL ¶
func (c *ConsulClient) GetServiceURL(servicename string, groupName ...string) (string, string)
GetServiceURL 方法用于从 Consul 查询服务地址 servicename 是要查询的服务名称 groupName 是可选的服务组名称
func (*ConsulClient) Register ¶
func (c *ConsulClient) Register(etcdConfigData []byte)
Register 方法用于向 Consul 注册服务 etcdConfigData 是包含 Consul 配置的字节切片
Click to show internal directories.
Click to hide internal directories.