Documentation ¶
Index ¶
- func GenerateAndRegisterConsulResolver(address string, serviceName string) (schema string, err error)
- func NewConsulBuilder(address string) resolver.Builder
- func NewConsulClientConn() resolver.ClientConn
- func NewConsulResolver(cc *resolver.ClientConn, cb *consulBuilder, opts resolver.BuildOptions) *consulResolver
- func Register(name string, host string, port int, target string, interval time.Duration, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateAndRegisterConsulResolver ¶
func GenerateAndRegisterConsulResolver(address string, serviceName string) (schema string, err error)
GenerateAndRegisterConsulResolver 生成
func NewConsulBuilder ¶
NewConsulBuilder 创建consulbuilder
func NewConsulResolver ¶
func NewConsulResolver(cc *resolver.ClientConn, cb *consulBuilder, opts resolver.BuildOptions) *consulResolver
NewConsulResolver 生成resolver
func Register ¶
func Register(name string, host string, port int, target string, interval time.Duration, ttl int) error
Register is the helper function to self-register service into Etcd/Consul server name - service name host - service host port - service port target - consul dial address, for example: "127.0.0.1:8500" interval - interval of self-register to consul ttl - ttl of the register information
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.