ringhash

package
v1.66.1 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package ringhash implements the ringhash balancer.

Index

Constants

View Source
const Name = "ring_hash_experimental"

Name is the name of the ring_hash balancer.

Variables

This section is empty.

Functions

func GetRequestHashForTesting

func GetRequestHashForTesting(ctx context.Context) uint64

GetRequestHashForTesting returns the request hash in the context; to be used for testing only.

func SetRequestHash

func SetRequestHash(ctx context.Context, requestHash uint64) context.Context

SetRequestHash adds the request hash to the context for use in Ring Hash Load Balancing.

Types

type LBConfig added in v1.41.0

type LBConfig struct {
	serviceconfig.LoadBalancingConfig `json:"-"`

	MinRingSize uint64 `json:"minRingSize,omitempty"`
	MaxRingSize uint64 `json:"maxRingSize,omitempty"`
}

LBConfig is the balancer config for ring_hash balancer.

Jump to

Keyboard shortcuts

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