loadbalancer

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRandomLoadBalancer

func NewRandomLoadBalancer(endpoints []*envoy_config_endpoint_v3.Endpoint) *randomLoadBalancer

func NewWeightedLeastLoadBalancer

func NewWeightedLeastLoadBalancer(
	endpoints []*envoy_config_endpoint_v3.Endpoint,
	endpointsLoad map[string]float64,
	endpointsStats *endpoint.EndpointsStats,
	choiceCount uint32,
	endpointWeightsAreEqual bool) *weightedLeastRequestLoadBalancer

func NewWeightedRoundRobinLoadBalancer

func NewWeightedRoundRobinLoadBalancer(
	endpoints []*envoy_config_endpoint_v3.Endpoint,
	endpointsLoad map[string]float64,
	endpointsStats *endpoint.EndpointsStats) *weightedRoundRobinLoadBalancer

Types

type LoadBalancer

type LoadBalancer interface {
	// NextEndpoint returns the next endpoint address according to the load balancing algorithm implemented
	// by the load balancer
	NextEndpoint() net.Addr
}

Jump to

Keyboard shortcuts

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