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
}
func InitConsul ¶
func InitConsul(c *ConsulConfig) (*ConsulClient, error)
func (*ConsulClient) Deregister ¶
func (cli *ConsulClient) Deregister(svcId string) error
func (*ConsulClient) ServiceList ¶
func (cli *ConsulClient) ServiceList(svcName string) ([]ServiceInfo, error)
获取服务列表
func (*ConsulClient) ServiceRegister ¶
func (cli *ConsulClient) ServiceRegister(c *RegisterConfig) error
服务注册
type ConsulConfig ¶
type ConsulConfig struct {
Address string
}
type HealthConfig ¶
type RegisterConfig ¶
type ServiceInfo ¶
Click to show internal directories.
Click to hide internal directories.