Documentation ¶
Index ¶
Constants ¶
View Source
const GRPCServiceConfig = `{"loadBalancingPolicy":"round_robin"}`
GRPCServiceConfig provides grpc service config
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
Resolver uses notifier to fetch list of available hosts
func New ¶
func New( notifier discovery.Notifier, discoverer discovery.Discoverer, logger *zap.Logger, discoveryMinPeers int, ) *Resolver
New initialize a new grpc resolver with notifier
func (*Resolver) Build ¶
func (r *Resolver) Build(target resolver.Target, cc resolver.ClientConn, opts resolver.BuildOption) (resolver.Resolver, error)
Build returns itself for Resolver, because it's both a builder and a resolver.
func (*Resolver) ResolveNow ¶
func (r *Resolver) ResolveNow(o resolver.ResolveNowOption)
ResolveNow is a noop for Resolver since resolver is already firing r.cc.UpdatesState every time it receives updates of new instance from discoCh
Click to show internal directories.
Click to hide internal directories.