Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
Resolver implements the gRPC Resolver interface using a Consul backend.
See the gRPC load balancing documentation for details about Balancer and Resolver: https://github.com/grpc/grpc/blob/master/doc/load-balancing.md.
func NewResolver ¶
NewResolver initializes and returns a new Resolver.
It resolves addresses for gRPC connections to the given service and tag. If the tag is irrelevant, use an empty string.
func (*Resolver) Next ¶
Next blocks until an update or error happens. It may return one or more updates. The first call will return the full set of instances available as NewResolver will look those up. Subsequent calls to Next() will block until the resolver finds any new or removed instance.
An error is returned if and only if the watcher cannot recover.