# Packages
Package fakegrpclb provides a fake implementation of the grpclb server.
Package pickfirst contains helper functions to check for pickfirst load balancing of RPCs in tests.
Package proxyserver provides an implementation of a proxy server for testing purposes.
Package rls contains utilities for RouteLookupService e2e tests.
Package roundrobin contains helper functions to check for roundrobin and weighted-roundrobin load balancing of RPCs in tests.
Package stats implements a TestMetricsRecorder utility.
No description provided by the author
# Functions
AwaitNoStateChange expects ctx to be canceled before sc's state leaves currState, and fatal errors otherwise.
AwaitNotState waits for sc to leave stateDoNotWant or fatal errors if it doesn't happen before ctx expires.
AwaitState waits for sc to enter stateWant or fatal errors if it doesn't happen before ctx expires.
CreateBootstrapFileForTesting creates a temporary file with the provided bootstrap contents, and updates the bootstrap environment variable to point to this file.
CreateClientTLSCredentials creates client-side TLS transport credentials using certificate and key files from testdata/x509 directory.
CreateServerTLSCredentials creates server-side TLS transport credentials using certificate and key files from testdata/x509 directory.
IsRoundRobin checks whether f's return value is roundrobin of elements from want.
LocalTCPListener returns a net.Listener listening on local address and port.
MarshalAny is a convenience function to marshal protobuf messages into any protos.
MustParseURL attempts to parse the provided target using url.Parse() and panics if parsing fails.
NewBalancerClientConn creates a BalancerClientConn.
NewBlockingDialer returns a dialer that waits for Resume() to be called before dialing.
NewChannel returns a new Channel.
NewChannelWithSize returns a new Channel with a buffer of bufSize.
NewListenerWrapper returns a ListenerWrapper.
NewPipeListener creates a new pipe listener.
NewRestartableListener returns a new RestartableListener wrapping l.
NewTestSubConn returns a newly initialized SubConn.
NewTestWRR return a WRR for testing.
ParsePort returns the port from the given address string, as a unit32.
StatusErrEqual returns true iff both err1 and err2 wrap status.Status errors and their underlying status protos are equal.
StayConnected makes sc stay connected by repeatedly calling sc.Connect() until the state becomes Shutdown or until the context expires.
SubConnFromPicker returns a function which returns a SubConn by calling the Pick() method of the provided picker.
# Constants
DefaultChanBufferSize is the default buffer size of the underlying channel.
DefaultHTTPRequestTimeout is the default timeout value for the amount of time this client waits for a response to be pushed on RespChan before it fails the Do() call.
# Variables
ErrTestConstPicker is error returned by test const picker.
# Structs
BalancerClientConn is a mock balancer.ClientConn used in tests.
BlockingDialer is a dialer that waits for Resume() to be called before dialing.
Channel wraps a generic channel and provides a timed receive operation.
ConnWrapper wraps a net.Conn and pushes on a channel when closed.
FakeHTTPClient helps mock out HTTP calls made by the code under test.
Hold is a handle to a single connection attempt.
ListenerWrapper wraps a net.Listener and the returned net.Conn.
PipeListener is a listener with an unbuffered pipe.
ResolverClientConn is a fake implementation of the resolver.ClientConn interface to be used in tests.
RestartableListener wraps a net.Listener and supports stopping and restarting the latter.
StubStatsHandler is a stats handler that is easy to customize within individual test cases.
TestConstPicker is a const picker for tests.
TestSubConn implements the SubConn interface, to be used in tests.
# Interfaces
Logger wraps the logging methods from testing.T.
A StateChanger reports state changes, e.g.