Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Consul ¶
type Consul struct {
// contains filtered or unexported fields
}
Consul consul核心对象
func (*Consul) GetGrpcClientConn ¶
func (c *Consul) GetGrpcClientConn(serviceName string) *grpc.ClientConn
GetGrpcClientConn 获取GRPC的客户端连接 @param serviceName,consul中的grpc服务名称
func (*Consul) Register ¶
func (c *Consul) Register(config ServiceConfig)
Register 注册Grpc微服务到consul @param host 地址 @param port 端口号 @param name 名称 @param id ID @param tags 标签列表 @param isGrpc 是否为grpc
Directories
¶
| Path | Synopsis |
|---|---|
|
backoff
Package backoff provides an exponential-backoff implementation.
|
Package backoff provides an exponential-backoff implementation. |
|
internal/mocks
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |
|
tests
Package tests is used for integration tests
|
Package tests is used for integration tests |
Click to show internal directories.
Click to hide internal directories.