direct

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

README

business/warden/resolver/direct

项目简介

warden 的直连服务模块,用于通过IP地址列表直接连接后端服务 连接字符串格式: direct://default/192.168.1.1:8080,192.168.1.2:8081

编译环境

  • 请只用 Golang v1.9.x 以上版本编译执行

依赖包

Documentation

Index

Constants

View Source
const (
	// Name is the name of direct resolver
	Name = "direct"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Direct

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

Direct is a resolver for conneting endpoints directly. example format: direct://default/192.168.1.1:8080,192.168.1.2:8081

func Build

func Build(id string) *Direct

Build build direct.

func New

func New() *Direct

New return Direct

func (*Direct) Build

func (d *Direct) Build(id string) naming.Resolver

Build direct build.

func (*Direct) Close

func (d *Direct) Close() error

Close close Direct

func (*Direct) Fetch

func (d *Direct) Fetch(ctx context.Context) (insMap map[string][]*naming.Instance, found bool)

Fetch fetch isntances

func (*Direct) Scheme

func (d *Direct) Scheme() string

Scheme return the Scheme of Direct

func (*Direct) Unwatch

func (d *Direct) Unwatch(id string)

Unwatch a tree

func (*Direct) Watch

func (d *Direct) Watch() <-chan struct{}

Watch a tree

Jump to

Keyboard shortcuts

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