resolver

package
v0.6.24 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2021 License: MIT Imports: 13 Imported by: 0

README

warden/resolver

项目简介

warden 的 服务发现模块,用于从底层的注册中心中获取Server节点列表并返回给GRPC

Documentation

Index

Constants

View Source
const (
	// Scheme is the scheme of discovery address
	Scheme = "grpc"
)

Variables

This section is empty.

Functions

func Register

func Register(b naming.Builder)

Register register resolver builder if nil.

func RegisterTarget

func RegisterTarget(target *string, discoveryID string)

RegisterTarget will register grpc discovery mock address flag

func Set

func Set(b naming.Builder)

Set override any registered builder

Types

type Builder

type Builder struct {
	naming.Builder
}

Builder is also a resolver builder. It's build() function always returns itself.

func (*Builder) Build

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

type Resolver

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

Resolver watches for the updates on the specified target. Updates include address updates and service config updates.

func (*Resolver) Close

func (r *Resolver) Close()

Close is a noop for Resolver.

func (*Resolver) ResolveNow

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

ResolveNow is a noop for Resolver.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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