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

Struct testRPCStream

credentials/alts/internal/handshaker/handshaker_test.go:67–81  ·  view source on GitHub ↗

testRPCStream mimics a altspb.HandshakerService_DoHandshakeClient object.

Source from the content-addressed store, hash-verified

65
66// testRPCStream mimics a altspb.HandshakerService_DoHandshakeClient object.
67type testRPCStream struct {
68 grpc.ClientStream
69 t *testing.T
70 isClient bool
71 // The resp expected to be returned by Recv(). Make sure this is set to
72 // the content the test requires before Recv() is invoked.
73 recvBuf *altspb.HandshakerResp
74 // false if it is the first access to Handshaker service on Envelope.
75 first bool
76 // useful for testing concurrent calls.
77 delay time.Duration
78 // The minimum expected value of the network_latency_ms field in a
79 // NextHandshakeMessageReq.
80 minExpectedNetworkLatency time.Duration
81}
82
83func (t *testRPCStream) Recv() (*altspb.HandshakerResp, error) {
84 resp := t.recvBuf

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected