pickfirst

package
v1.68.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: Apache-2.0 Imports: 14 Imported by: 2

Documentation

Overview

Package pickfirst contains the pick_first load balancing policy.

Index

Constants

View Source
const (
	// Name is the name of the pick_first balancer.
	Name = "pick_first"
)

Variables

This section is empty.

Functions

func ShuffleAddressListForTesting

func ShuffleAddressListForTesting(n int, swap func(i, j int))

ShuffleAddressListForTesting pseudo-randomizes the order of addresses. n is the number of elements. swap swaps the elements with indexes i and j.

Types

type Shuffler

type Shuffler interface {
	ShuffleAddressListForTesting(n int, swap func(i, j int))
}

Shuffler is an interface for shuffling an address list.

Directories

Path Synopsis
Package internal contains code internal to the pickfirst package.
Package internal contains code internal to the pickfirst package.
Package pickfirstleaf contains the pick_first load balancing policy which will be the universal leaf policy after dualstack changes are implemented.
Package pickfirstleaf contains the pick_first load balancing policy which will be the universal leaf policy after dualstack changes are implemented.

Jump to

Keyboard shortcuts

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