strategy

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2021 License: Apache-2.0 Imports: 10 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)

	//Close Strategy
	Close()
}

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