grpcresolver

package
v1.12.0 Latest Latest
Warning

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

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

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 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 intialize 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 everytime 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