direct

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 License: MIT Imports: 6 Imported by: 0

README

warden/resolver/direct

项目简介

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

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, opt ...naming.BuildOpt) 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) (res *naming.InstancesInfo, found bool)

Fetch fetch instances.

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