MCPcopy
hub / github.com/grpc/grpc-go / testServer

Struct testServer

credentials/xds/xds_client_test.go:76–81  ·  view source on GitHub ↗

testServer is a no-op server which listens on a local TCP port for incoming connections, and performs a manual TLS handshake on the received raw connection using a user specified handshake function. It then makes the result of the handshake operation available through a channel for tests to inspect.

Source from the content-addressed store, hash-verified

74// result of the handshake operation available through a channel for tests to
75// inspect. Tests should stop the testServer as part of their cleanup.
76type testServer struct {
77 lis net.Listener
78 address string // Listening address of the test server.
79 handshakeFunc testHandshakeFunc // Test specified handshake function.
80 hsResult *testutils.Channel // Channel to deliver handshake results.
81}
82
83// handshakeResult wraps the result of the handshake operation on the test
84// server. It consists of TLS connection state and an error, if the handshake

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected