package pickfirst

import "google.golang.org/grpc/internal/testutils/pickfirst"

Package pickfirst contains helper functions to check for pickfirst load balancing of RPCs in tests.

Index

Functions

func CheckRPCsToBackend

func CheckRPCsToBackend(ctx context.Context, cc *grpc.ClientConn, wantAddr resolver.Address) error

CheckRPCsToBackend makes a bunch of RPCs on the given ClientConn and verifies if the RPCs are routed to a peer matching wantAddr.

Returns a non-nil error if context deadline expires before all RPCs begin to be routed to the peer matching wantAddr, or if the backend returns RPC errors.

Source Files

pickfirst.go

Version
v1.70.0 (latest)
Published
Jan 23, 2025
Platform
linux/amd64
Imports
7 packages
Last checked
28 minutes ago

Tools for package owners.