[−][src]Trait client::pb::server::TestService
A simple service to test the various types of RPCs and experiment with performance with various types of payload.
Associated Types
type EmptyCallFuture: Future<Item = Response<Empty>, Error = Status>
type UnaryCallFuture: Future<Item = Response<SimpleResponse>, Error = Status>
type CacheableUnaryCallFuture: Future<Item = Response<SimpleResponse>, Error = Status>
type StreamingOutputCallStream: Stream<Item = StreamingOutputCallResponse, Error = Status>
type StreamingOutputCallFuture: Future<Item = Response<Self::StreamingOutputCallStream>, Error = Status>
type StreamingInputCallFuture: Future<Item = Response<StreamingInputCallResponse>, Error = Status>
type FullDuplexCallStream: Stream<Item = StreamingOutputCallResponse, Error = Status>
type FullDuplexCallFuture: Future<Item = Response<Self::FullDuplexCallStream>, Error = Status>
type HalfDuplexCallStream: Stream<Item = StreamingOutputCallResponse, Error = Status>
type HalfDuplexCallFuture: Future<Item = Response<Self::HalfDuplexCallStream>, Error = Status>
type UnimplementedCallFuture: Future<Item = Response<Empty>, Error = Status>
Required methods
fn empty_call(&mut self, request: Request<Empty>) -> Self::EmptyCallFuture
One empty request followed by one empty response.
fn unary_call(
&mut self,
request: Request<SimpleRequest>
) -> Self::UnaryCallFuture
&mut self,
request: Request<SimpleRequest>
) -> Self::UnaryCallFuture
One request followed by one response.
fn cacheable_unary_call(
&mut self,
request: Request<SimpleRequest>
) -> Self::CacheableUnaryCallFuture
&mut self,
request: Request<SimpleRequest>
) -> Self::CacheableUnaryCallFuture
One request followed by one response. Response has cache control headers set such that a caching HTTP proxy (such as GFE) can satisfy subsequent requests.
fn streaming_output_call(
&mut self,
request: Request<StreamingOutputCallRequest>
) -> Self::StreamingOutputCallFuture
&mut self,
request: Request<StreamingOutputCallRequest>
) -> Self::StreamingOutputCallFuture
One request followed by a sequence of responses (streamed download). The server returns the payload with client desired type and sizes.
fn streaming_input_call(
&mut self,
request: Request<Streaming<StreamingInputCallRequest>>
) -> Self::StreamingInputCallFuture
&mut self,
request: Request<Streaming<StreamingInputCallRequest>>
) -> Self::StreamingInputCallFuture
A sequence of requests followed by one response (streamed upload). The server returns the aggregated size of client payload as the result.
fn full_duplex_call(
&mut self,
request: Request<Streaming<StreamingOutputCallRequest>>
) -> Self::FullDuplexCallFuture
&mut self,
request: Request<Streaming<StreamingOutputCallRequest>>
) -> Self::FullDuplexCallFuture
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.
fn half_duplex_call(
&mut self,
request: Request<Streaming<StreamingOutputCallRequest>>
) -> Self::HalfDuplexCallFuture
&mut self,
request: Request<Streaming<StreamingOutputCallRequest>>
) -> Self::HalfDuplexCallFuture
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.
fn unimplemented_call(
&mut self,
request: Request<Empty>
) -> Self::UnimplementedCallFuture
&mut self,
request: Request<Empty>
) -> Self::UnimplementedCallFuture
The test server will not implement this method. It will be used to test the behavior when clients call unimplemented methods.