grpcresolver

package
v1.15.1 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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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