Home
last modified time | relevance | path

Searched refs:client (Results 1 – 25 of 90) sorted by relevance

1234

/tonic/interop/src/bin/
H A Dclient.rs1 use interop::client;
51 let mut client = client::TestClient::new(channel.clone()); in main() localVariable
61 Testcase::EmptyUnary => client::empty_unary(&mut client, &mut test_results).await, in main()
62 Testcase::LargeUnary => client::large_unary(&mut client, &mut test_results).await, in main()
64 client::client_streaming(&mut client, &mut test_results).await in main()
67 client::server_streaming(&mut client, &mut test_results).await in main()
69 Testcase::PingPong => client::ping_pong(&mut client, &mut test_results).await, in main()
72 client::status_code_and_message(&mut client, &mut test_results).await in main()
75 client::special_status_message(&mut client, &mut test_results).await in main()
78 client::unimplemented_method(&mut client, &mut test_results).await in main()
[all …]
/tonic/examples/
H A DCargo.toml12 name = "helloworld-client"
20 name = "blocking-client"
29 name = "routeguide-client"
58 name = "tls-client"
59 path = "src/tls/client.rs"
83 name = "tls-client-auth-client"
93 name = "tower-client"
106 name = "gcp-client"
111 name = "tracing-client"
121 name = "uds-client"
[all …]
H A DREADME.md34 $ cargo run --bin helloworld-client
48 $ cargo run --bin routeguide-client
62 $ cargo run --bin authentication-client
76 $ cargo run --bin load-balance-client
90 $ cargo run --bin dynamic-load-balance-client
104 $ cargo run --bin tls-client
166 $ cargo run --bin richer-error-client
172 $ cargo run --bin richer-error-client-vec
/tonic/examples/src/mock/
H A Dmock.rs20 let (client, server) = tokio::io::duplex(1024); in main()
33 let mut client = Some(client); in main() localVariable
36 let client = client.take(); in main() localVariable
39 if let Some(client) = client { in main()
40 Ok(TokioIo::new(client)) in main()
48 let mut client = GreeterClient::new(channel); in main() localVariable
54 let response = client.say_hello(request).await?; in main()
/tonic/tests/integration_tests/tests/
H A Dmax_message_size.rs159 let mut client = Some(client); in response_stream_limit() localVariable
163 let client = client.take(); in response_stream_limit() localVariable
166 if let Some(client) = client { in response_stream_limit()
167 Ok(TokioIo::new(client)) in response_stream_limit()
178 let mut client = client.max_decoding_message_size(6877902 + 5); in response_stream_limit() localVariable
325 let mut client = Some(client); in max_message_run() localVariable
329 let client = client.take(); in max_message_run() localVariable
332 if let Some(client) = client { in max_message_run()
333 Ok(TokioIo::new(client)) in max_message_run()
347 client in max_message_run()
[all …]
H A Dconnection.rs57 let mut client = TestClient::connect(format!("http://{addr}")).await.unwrap(); in connect_returns_err_via_call_after_connected() localVariable
60 client.unary_call(Request::new(Input {})).await.unwrap(); in connect_returns_err_via_call_after_connected()
64 let res = client.unary_call(Request::new(Input {})).await; in connect_returns_err_via_call_after_connected()
80 let mut client = TestClient::new(channel); in connect_lazy_reconnects_after_first_failure() localVariable
83 client.unary_call(Request::new(Input {})).await.unwrap_err(); in connect_lazy_reconnects_after_first_failure()
103 let mut client = TestClient::new(channel); in connect_lazy_reconnects_after_first_failure() localVariable
106 client.unary_call(Request::new(Input {})).await.unwrap(); in connect_lazy_reconnects_after_first_failure()
110 let err = client.unary_call(Request::new(Input {})).await.unwrap_err(); in connect_lazy_reconnects_after_first_failure()
H A Dtimeout.rs10 let mut client = test_client::TestClient::connect(format!("http://{}", addr)) in cancelation_on_timeout() localVariable
19 let res = client.unary_call(req).await; in cancelation_on_timeout()
30 let mut client = test_client::TestClient::connect(format!("http://{}", addr)) in picks_server_timeout_if_thats_sorter() localVariable
39 let res = client.unary_call(req).await; in picks_server_timeout_if_thats_sorter()
49 let mut client = test_client::TestClient::connect(format!("http://{}", addr)) in picks_client_timeout_if_thats_sorter() localVariable
58 let res = client.unary_call(req).await; in picks_client_timeout_if_thats_sorter()
/tonic/examples/src/streaming/
H A Dclient.rs17 async fn streaming_echo(client: &mut EchoClient<Channel>, num: usize) { in streaming_echo()
18 let stream = client in streaming_echo()
34 async fn bidirectional_streaming_echo(client: &mut EchoClient<Channel>, num: usize) { in bidirectional_streaming_echo()
37 let response = client in bidirectional_streaming_echo()
50 async fn bidirectional_streaming_echo_throttle(client: &mut EchoClient<Channel>, dur: Duration) { in bidirectional_streaming_echo_throttle()
53 let response = client in bidirectional_streaming_echo_throttle()
68 let mut client = EchoClient::connect("http://[::1]:50051").await.unwrap(); in main() localVariable
71 streaming_echo(&mut client, 5).await; in main()
76 bidirectional_streaming_echo(&mut client, 17).await; in main()
82 bidirectional_streaming_echo_throttle(&mut client, Duration::from_secs(2)).await; in main()
/tonic/examples/src/h2c/
H A Dclient.rs4 use hyper_util::client::legacy::Client;
15 client: Client::builder(TokioExecutor::new()).build_http(), in main()
18 let mut client = GreeterClient::with_origin(h2c_client, origin); in main() localVariable
24 let response = client.say_hello(request).await?; in main()
39 client::legacy::{connect::HttpConnector, Client},
46 pub client: Client<HttpConnector, Body>, field
60 let client = self.client.clone(); in call() localVariable
71 let res = client.request(h2c_req).await.unwrap(); in call()
81 hyper::client::conn::http2::Builder::new(TokioExecutor::new()) in call()
/tonic/examples/src/routeguide/
H A Dclient.rs17 async fn print_features(client: &mut RouteGuideClient<Channel>) -> Result<(), Box<dyn Error>> { in print_features()
29 let mut stream = client in print_features()
41 async fn run_record_route(client: &mut RouteGuideClient<Channel>) -> Result<(), Box<dyn Error>> { in run_record_route()
53 match client.record_route(request).await { in run_record_route()
61 async fn run_route_chat(client: &mut RouteGuideClient<Channel>) -> Result<(), Box<dyn Error>> { in run_route_chat()
82 let response = client.route_chat(Request::new(outbound)).await?; in run_route_chat()
94 let mut client = RouteGuideClient::connect("http://[::1]:10000").await?; in main() localVariable
97 let response = client in main()
106 print_features(&mut client).await?; in main()
109 run_record_route(&mut client).await?; in main()
[all …]
/tonic/examples/src/grpc-web/
H A Dclient.rs12 let client = hyper_util::client::legacy::Client::builder(TokioExecutor::new()).build_http(); in main() localVariable
16 .service(client); in main()
18 let mut client = GreeterClient::with_origin(svc, "http://127.0.0.1:3000".try_into()?); in main() localVariable
24 let response = client.say_hello(request).await?; in main()
/tonic/tests/compression/src/
H A Dcompressing_response.rs84 let mut client = in client_enabled_server_enabled() localVariable
139 let mut client = in client_enabled_server_disabled() localVariable
142 let res = client.compress_output_unary(()).await.unwrap(); in client_enabled_server_disabled()
180 let mut client = test_client::TestClient::new(mock_io_channel(client).await) in client_enabled_server_disabled_multi_encoding() localVariable
185 let res = client.compress_output_unary(()).await.unwrap(); in client_enabled_server_disabled_multi_encoding()
254 let mut client = test_client::TestClient::new(mock_io_channel(client).await); in client_disabled() localVariable
256 let res = client.compress_output_unary(()).await.unwrap(); in client_disabled()
297 let mut client = in server_replying_with_unsupported_encoding() localVariable
347 let mut client = in disabling_compression_on_single_response() localVariable
405 let mut client = in disabling_compression_on_response_but_keeping_compression_on_stream() localVariable
[all …]
H A Dcompressing_request.rs14 let (client, server) = tokio::io::duplex(UNCOMPRESSED_MIN_BODY_SIZE * 10); in client_enabled_server_enabled()
67 let mut client = in client_enabled_server_enabled() localVariable
71 client in client_enabled_server_enabled()
91 let (client, server) = tokio::io::duplex(UNCOMPRESSED_MIN_BODY_SIZE * 10); in client_enabled_server_enabled_multi_encoding()
129 let mut client = in client_enabled_server_enabled_multi_encoding() localVariable
133 client in client_enabled_server_enabled_multi_encoding()
165 let mut client = in client_enabled_server_disabled() localVariable
168 let status = client in client_enabled_server_disabled()
218 let mut client = test_client::TestClient::with_interceptor( in client_mark_compressed_without_header_server_enabled() localVariable
219 mock_io_channel(client).await, in client_mark_compressed_without_header_server_enabled()
[all …]
H A Dserver_stream.rs14 let (client, server) = tokio::io::duplex(UNCOMPRESSED_MIN_BODY_SIZE * 10); in client_enabled_server_enabled()
41 let mut client = in client_enabled_server_enabled() localVariable
42 test_client::TestClient::new(mock_io_channel(client).await).accept_compressed(encoding); in client_enabled_server_enabled()
44 let res = client.compress_output_server_stream(()).await.unwrap(); in client_enabled_server_enabled()
79 let (client, server) = tokio::io::duplex(UNCOMPRESSED_MIN_BODY_SIZE * 10); in client_disabled_server_enabled()
106 let mut client = test_client::TestClient::new(mock_io_channel(client).await); in client_disabled_server_enabled() localVariable
108 let res = client.compress_output_server_stream(()).await.unwrap(); in client_disabled_server_enabled()
131 let (client, server) = tokio::io::duplex(UNCOMPRESSED_MIN_BODY_SIZE * 10); in client_enabled_server_disabled()
158 let mut client = in client_enabled_server_disabled() localVariable
159 test_client::TestClient::new(mock_io_channel(client).await).accept_compressed(encoding); in client_enabled_server_disabled()
[all …]
H A Dclient_stream.rs14 let (client, server) = tokio::io::duplex(UNCOMPRESSED_MIN_BODY_SIZE * 10); in client_enabled_server_enabled()
65 let mut client = in client_enabled_server_enabled() localVariable
72 client.compress_input_client_stream(req).await.unwrap(); in client_enabled_server_enabled()
87 let (client, server) = tokio::io::duplex(UNCOMPRESSED_MIN_BODY_SIZE * 10); in client_disabled_server_enabled()
117 let mut client = test_client::TestClient::new(mock_io_channel(client).await); in client_disabled_server_enabled() localVariable
123 client.compress_input_client_stream(req).await.unwrap(); in client_disabled_server_enabled()
138 let (client, server) = tokio::io::duplex(UNCOMPRESSED_MIN_BODY_SIZE * 10); in client_enabled_server_disabled()
150 let mut client = in client_enabled_server_disabled() localVariable
157 let status = client.compress_input_client_stream(req).await.unwrap_err(); in client_enabled_server_disabled()
211 let mut client = in compressing_response_from_client_stream() localVariable
[all …]
H A Dutil.rs136 pub async fn mock_io_channel(client: tokio::io::DuplexStream) -> Channel { in mock_io_channel()
137 let mut client = Some(client); in mock_io_channel() localVariable
142 let client = TokioIo::new(client.take().unwrap()); in mock_io_channel() localVariable
143 async move { Ok::<_, std::io::Error>(client) } in mock_io_channel()
/tonic/examples/src/blocking/
H A Dclient.rs17 client: GreeterClient<tonic::transport::Channel>, field
28 let client = rt.block_on(GreeterClient::connect(dst))?; in connect() localVariable
30 Ok(Self { client, rt }) in connect()
37 self.rt.block_on(self.client.say_hello(request)) in say_hello()
42 let mut client = BlockingClient::connect("http://[::1]:50051")?; in main() localVariable
48 let response = client.say_hello(request)?; in main()
/tonic/interop/src/
H A Dclient.rs22 let result = client.empty_call(Request::new(Empty {})).await; in empty_unary()
50 let result = client.unary_call(Request::new(req)).await; in large_unary()
92 let result = client.streaming_input_call(Request::new(stream)).await; in client_streaming()
121 let result = client.streaming_output_call(req).await; in server_streaming()
157 let result = client in ping_pong()
211 let result = client.full_duplex_call(Request::new(stream)).await; in empty_stream()
270 let result = client.unary_call(Request::new(simple_req)).await; in status_code_and_message()
295 let result = client.unary_call(Request::new(req)).await; in special_status_message()
329 client: &mut UnimplementedClient, in unimplemented_service()
364 let response = client in custom_metadata()
[all …]
/tonic/examples/src/tls_rustls/
H A Dclient.rs9 use hyper_util::{client::legacy::connect::HttpConnector, rt::TokioExecutor};
53 let client = hyper_util::client::legacy::Client::builder(TokioExecutor::new()).build(connector); in main() localVariable
58 let mut client = EchoClient::with_origin(client, uri); in main() localVariable
64 let response = client.unary_echo(request).await?; in main()
/tonic/examples/src/interceptor/
H A Dclient.rs20 let mut client = GreeterClient::with_interceptor(channel, intercept); in main() localVariable
26 let response = client.say_hello(request).await?; in main()
57 let client: GreeterClient<InterceptedService<Channel, MyInterceptor>> = in using_named_interceptor() localVariable
71 let client: GreeterClient< in using_function_pointer_interceptro() localVariable
/tonic/tests/default_stubs/src/
H A Dtest_defaults.rs20 let mut client = test_client::TestClient::connect(format!("http://{}", addrs.0)) in test_default_stubs() localVariable
24 client.unary(()).await.unwrap_err().code(), in test_default_stubs()
28 client.server_stream(()).await.unwrap_err().code(), in test_default_stubs()
32 client in test_default_stubs()
40 client in test_default_stubs()
/tonic/examples/src/helloworld/
H A Dclient.rs10 let mut client = GreeterClient::connect("http://[::1]:50051").await?; in main() localVariable
16 let response = client.say_hello(request).await?; in main()
/tonic/examples/src/codec_buffers/
H A Dclient.rs19 let mut client = GreeterClient::connect("http://[::1]:50051").await?; in main() localVariable
25 let response = client.say_hello(request).await?; in main()
/tonic/examples/src/json-codec/
H A Dclient.rs17 let mut client = GreeterClient::connect("http://[::1]:50051").await?; in main() localVariable
23 let response = client.say_hello(request).await?; in main()
/tonic/tonic-web/src/
H A Dlib.rs74 pub use client::{GrpcWebClientLayer, GrpcWebClientService};
79 mod client; module

1234