grpcresolver

package
v1.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

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

Build returns itself for Resolver, because it's both a builder and a resolver.

func (*Resolver) Close

func (r *Resolver) Close()

Close closes both discoCh

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

func (*Resolver) Scheme

func (r *Resolver) Scheme() string

Scheme returns resolver's scheme.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL