balancer

package
v3.16.12-rc0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Balancer

type Balancer interface {
	// Next returns next connection for request.
	// Next MUST not return nil if it has at least one connection.
	Next() conn.Conn

	// Insert inserts new connection.
	Insert(conn.Conn) Element

	// Remove removes previously inserted connection.
	Remove(Element) bool

	// Contains returns true if Balancer contains requested element.
	Contains(Element) bool

	// Create makes empty balancer with same implementation
	Create() Balancer
}

Balancer is an interface that implements particular load-balancing algorithm.

Balancer methods called synchronized. That is, implementations must not provide additional goroutine safety.

type Element

type Element interface{}

Element is an empty interface that holds some Balancer specific data.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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