resolver

package
v2.5.5 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package resolver defines APIs for name resolution in gRPC.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register added in v2.4.0

func Register(registry gsvc.Registry)

Register sets the default Registry implements as your own implemented interface.

Types

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

Builder is the builder for the etcd discovery resolver.

func NewBuilder

func NewBuilder(discovery gsvc.Discovery) *Builder

NewBuilder creates and returns a Builder.

func (*Builder) Build

Build creates a new etcd discovery resolver.

func (*Builder) Scheme

func (*Builder) Scheme() string

Scheme return scheme of discovery

type Manager

type Manager struct{}

Manager for Builder creating.

func (Manager) New

func (m Manager) New(discovery gsvc.Discovery) resolver.Builder

New creates and returns a Builder.

func (Manager) Register added in v2.4.0

func (m Manager) Register(registry gsvc.Registry)

Register sets the default Registry implements as your own implemented interface.

type Resolver

type Resolver struct {
	// contains filtered or unexported fields
}

Resolver implements grpc resolver.Resolver, which watches for the updates on the specified target. Updates include address updates and service config updates.

func (*Resolver) Close

func (r *Resolver) Close()

Close closes the resolver.

func (*Resolver) ResolveNow

func (r *Resolver) ResolveNow(options resolver.ResolveNowOptions)

ResolveNow will be called by gRPC to try to resolve the target name again. It's just a hint, resolver can ignore this if it's not necessary.

It could be called multiple times concurrently.

Jump to

Keyboard shortcuts

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