Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenUpdates ¶
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 etcd ttl - ttl of the register information
Types ¶
type ConsulResolver ¶
type ConsulResolver struct {
ServiceName string //service name
}
ConsulResolver is the implementaion of grpc.naming.Resolver
func NewResolver ¶
func NewResolver(serviceName string) *ConsulResolver
NewResolver return ConsulResolver with service name
type ConsulWatcher ¶
type ConsulWatcher struct {
// contains filtered or unexported fields
}
ConsulWatcher is the implementation of grpc.naming.Watcher
Click to show internal directories.
Click to hide internal directories.