package ringhash
import "google.golang.org/grpc/xds/internal/balancer/ringhash"
Package ringhash implements the ringhash balancer.
Index ¶
- Constants
- func GetRequestHashForTesting(ctx context.Context) uint64
- func SetRequestHash(ctx context.Context, requestHash uint64) context.Context
- type LBConfig
Constants ¶
const Name = "ring_hash_experimental"
Name is the name of the ring_hash balancer.
Functions ¶
func GetRequestHashForTesting ¶
GetRequestHashForTesting returns the request hash in the context; to be used for testing only.
func SetRequestHash ¶
SetRequestHash adds the request hash to the context for use in Ring Hash Load Balancing.
Types ¶
type LBConfig ¶
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.
Source Files ¶
config.go logging.go picker.go ring.go ringhash.go util.go
Directories ¶
Path | Synopsis |
---|---|
xds/internal/balancer/ringhash/e2e |
- Version
- v1.70.0 (latest)
- Published
- Jan 23, 2025
- Platform
- linux/amd64
- Imports
- 21 packages
- Last checked
- 20 hours ago –
Tools for package owners.