Documentation ¶
Index ¶
- Constants
- type TestServer
- func (TestServer) EmptyCall(ctx context.Context, req *grpc_testing.Empty) (*grpc_testing.Empty, error)
- func (TestServer) FullDuplexCall(str grpc_testing.TestService_FullDuplexCallServer) error
- func (TestServer) HalfDuplexCall(str grpc_testing.TestService_HalfDuplexCallServer) error
- func (TestServer) StreamingInputCall(str grpc_testing.TestService_StreamingInputCallServer) error
- func (TestServer) StreamingOutputCall(req *grpc_testing.StreamingOutputCallRequest, ...) error
- func (TestServer) UnaryCall(ctx context.Context, req *grpc_testing.SimpleRequest) (*grpc_testing.SimpleResponse, error)
Constants ¶
const ( MetadataReplyHeaders = "reply-with-headers" MetadataReplyTrailers = "reply-with-trailers" MetadataFailEarly = "fail-early" MetadataFailLate = "fail-late" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TestServer ¶
type TestServer struct{}
func (TestServer) EmptyCall ¶
func (TestServer) EmptyCall(ctx context.Context, req *grpc_testing.Empty) (*grpc_testing.Empty, error)
One empty request followed by one empty response.
func (TestServer) FullDuplexCall ¶
func (TestServer) FullDuplexCall(str grpc_testing.TestService_FullDuplexCallServer) error
A sequence of requests with each request served by the server immediately. As one request could lead to multiple responses, this interface demonstrates the idea of full duplexing.
func (TestServer) HalfDuplexCall ¶
func (TestServer) HalfDuplexCall(str grpc_testing.TestService_HalfDuplexCallServer) error
A sequence of requests followed by a sequence of responses. The server buffers all the client requests and then serves them in order. A stream of responses are returned to the client when the server starts with first request.
func (TestServer) StreamingInputCall ¶
func (TestServer) StreamingInputCall(str grpc_testing.TestService_StreamingInputCallServer) error
A sequence of requests followed by one response (streamed upload). The server returns the aggregated size of client payload as the result.
func (TestServer) StreamingOutputCall ¶
func (TestServer) StreamingOutputCall(req *grpc_testing.StreamingOutputCallRequest, str grpc_testing.TestService_StreamingOutputCallServer) error
One request followed by a sequence of responses (streamed download). The server returns the payload with client desired type and sizes.
func (TestServer) UnaryCall ¶
func (TestServer) UnaryCall(ctx context.Context, req *grpc_testing.SimpleRequest) (*grpc_testing.SimpleResponse, error)
One request followed by one response. The server returns the client payload as-is.