direct

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2022 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 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