package ringhash
import "google.golang.org/grpc/xds/internal/balancer/ringhash"
Package ringhash implements the ringhash balancer.
Index ¶
- Constants
- func SetXDSRequestHash(ctx context.Context, requestHash uint64) context.Context
- func XDSRequestHash(ctx context.Context) (uint64, bool)
- type LBConfig
Constants ¶
const Name = "ring_hash_experimental"
Name is the name of the ring_hash balancer.
Functions ¶
func SetXDSRequestHash ¶
SetXDSRequestHash adds the request hash to the context for use in Ring Hash Load Balancing using xDS route hash_policy.
func XDSRequestHash ¶
XDSRequestHash returns the request hash in the context and true if it was set from the xDS config selector. If the xDS config selector has not set the hash, it returns 0 and false.
Types ¶
type LBConfig ¶
type LBConfig struct { serviceconfig.LoadBalancingConfig `json:"-"` MinRingSize uint64 `json:"minRingSize,omitempty"` MaxRingSize uint64 `json:"maxRingSize,omitempty"` RequestHashHeader string `json:"requestHashHeader,omitempty"` }
LBConfig is the balancer config for ring_hash balancer.
Source Files ¶
config.go logging.go picker.go ring.go ringhash.go util.go
Directories ¶
Path | Synopsis |
---|---|
xds/internal/balancer/ringhash/e2e |
- Version
- v1.72.0 (latest)
- Published
- Apr 21, 2025
- Platform
- js/wasm
- Imports
- 27 packages
- Last checked
- 39 seconds ago –
Tools for package owners.