balancer

package
v0.0.0-...-fc7dab2 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Algo

type Algo int
const (
	Random Algo = iota
	RoundRobin
)

func (Algo) String

func (algo Algo) String() string

type Balancer

type Balancer interface {
	ForwardCall(srv interface{}, stream grpc.ServerStream) error
	RandomChoice(svcName string) net.Addr
	RoundRobinChoice(svcName string) net.Addr
}

type BalancerConfigurator

type BalancerConfigurator interface {
	PreferredAlgoByServiceName(svcName string) (Algo, bool)
	DefaultAlgo() Algo
}

Jump to

Keyboard shortcuts

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