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

Function newTestServerWithHandshakeFunc

credentials/xds/xds_client_test.go:98–105  ·  view source on GitHub ↗

newTestServerWithHandshakeFunc starts a new testServer which listens for connections on a local TCP port, and uses the provided custom handshake function to perform TLS handshake.

(ctx context.Context, f testHandshakeFunc)

Source from the content-addressed store, hash-verified

96// connections on a local TCP port, and uses the provided custom handshake
97// function to perform TLS handshake.
98func newTestServerWithHandshakeFunc(ctx context.Context, f testHandshakeFunc) *testServer {
99 ts := &testServer{
100 handshakeFunc: f,
101 hsResult: testutils.NewChannel(),
102 }
103 ts.start(ctx)
104 return ts
105}
106
107// starts actually starts listening on a local TCP port, and spawns a goroutine
108// to handle new connections.

Calls 2

startMethod · 0.95
NewChannelFunction · 0.92

Tested by

no test coverage detected