u_load_balancer

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPanicRoundRobinBalancer

func NewPanicRoundRobinBalancer(hosts []string) roundrobin.RoundRobin

func NewPanicWeightedRoundRobinBalancer

func NewPanicWeightedRoundRobinBalancer(nodes []*Node) lbapi.Balancer

func NewRoundRobinBalancer

func NewRoundRobinBalancer(hosts []string) (roundrobin.RoundRobin, error)

func NewWeightedRoundRobinBalancer

func NewWeightedRoundRobinBalancer(nodes []*Node) (lbapi.Balancer, error)

Types

type Node

type Node struct {
	Addr     string
	Weighted int
}

func (*Node) String

func (s *Node) String() string

func (*Node) Weight

func (s *Node) Weight() int

Jump to

Keyboard shortcuts

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