strategy

package
v1.1.31 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorNoneServer   = errors.New("server is none to use")
	ErrorNoSuchServer = errors.New("no such server")
)

Functions

This section is empty.

Types

type Strategy

type Strategy interface {

	//Next Round-robin scheduling
	Next(scope string) (next *conn.Conn, err error)

	//Straight direct call
	Straight(scope, address string) (next *conn.Conn, err error)

	//CloseStrategy Strategy
	CloseStrategy()
}

func NewStrategy

func NewStrategy(
	local *endpoint.Endpoint,
	registry registry.Registry,
) Strategy

NewStrategy create a strategy

Jump to

Keyboard shortcuts

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