Home
last modified time | relevance | path

Searched refs:status (Results 1 – 25 of 40) sorted by relevance

12

/tonic/tonic-health/src/
H A Dserver.rs128 Ok(Response::new(HealthCheckResponse::new(status))) in check()
168 .map(|opt| opt.map(|status| Ok(HealthCheckResponse::new(status)))) in poll_next()
179 fn new(status: ServingStatus) -> Self { in new()
180 let status = crate::pb::health_check_response::ServingStatus::from(status) as i32; in new() localVariable
181 Self { status } in new()
233 assert_serving_status(resp.status, ServingStatus::Serving); in test_service_check()
252 assert_serving_status(resp.status, ServingStatus::Unknown); in test_service_check()
265 assert_serving_status(resp.status, ServingStatus::Serving); in test_service_check()
285 assert_serving_status(item.status, ServingStatus::Serving); in test_service_watch()
311 assert_serving_status(item.status, ServingStatus::Unknown); in test_service_watch()
[all …]
/tonic/tonic-health/proto/
H A Dhealth.proto39 ServingStatus status = 1; field
43 // If the requested service is unknown, the call will fail with status
47 // Performs a watch for the serving status of the requested service.
49 // serving status. It will then subsequently send a new message whenever
50 // the service's serving status changes.
53 // server will send a message setting the serving status to
55 // future point, the serving status of the service becomes known, the
56 // server will send a new message with the service's serving status.
58 // If the call terminates with status UNIMPLEMENTED, then clients
60 // call. If the call terminates with any other status (including OK),
/tonic/tonic-types/src/richer_error/
H A Dmod.rs38 let status = pb::Status { in gen_details_bytes() localVariable
47 status.encode(&mut buf).unwrap(); in gen_details_bytes()
609 status.check_error_details() in check_error_details()
619 status.check_error_details_vec() in check_error_details_vec()
629 status.get_details_retry_info() in get_details_retry_info()
635 status.get_details_debug_info() in get_details_debug_info()
641 status.get_details_quota_failure() in get_details_quota_failure()
647 status.get_details_error_info() in get_details_error_info()
659 status.get_details_bad_request() in get_details_bad_request()
665 status.get_details_request_info() in get_details_request_info()
[all …]
/tonic/tonic/src/codec/
H A Dencode.rs89 if let Some(status) = error.take() { in poll_next()
90 return Poll::Ready(Some(Err(status))); in poll_next()
105 if let Err(status) = encode_item( in poll_next()
114 return Poll::Ready(Some(Err(status))); in poll_next()
121 Poll::Ready(Some(Err(status))) => { in poll_next()
123 return Poll::Ready(Some(Err(status))); in poll_next()
125 *error = Some(status); in poll_next()
292 let status = if let Some(status) = self.error.take() { in trailers() localVariable
293 status in trailers()
297 Some(status.to_header_map()) in trailers()
[all …]
H A Ddecode.rs173 let message = if let Direction::Response(status) = self.direction { in decode_chunk()
176 f, status in decode_chunk()
225 let message = if let Direction::Response(status) = self.direction { in decode_chunk()
228 err, status in decode_chunk()
251 Some(Err(status)) => { in poll_frame()
257 debug!("decoder inner stream error: {:?}", status); in poll_frame()
258 return Poll::Ready(Err(status)); in poll_frame()
288 if let Direction::Response(status) = self.direction { in response()
289 if let Err(Some(e)) = crate::status::infer_grpc_status(self.trailers.as_ref(), status) { in response()
394 if let State::Error(status) = &mut self.inner.state { in poll_next()
[all …]
/tonic/tonic/src/
H A Dstatus.rs322 status in from_error()
337 Ok(status) => { in try_from_error()
338 return Ok(*status); in try_from_error()
353 return Ok(status); in try_from_error()
366 status in from_h2_error()
426 return Some(status); in from_hyper_error()
601 code: status.code, in find_status_in_source_chain()
680 fn from(status: Status) -> Self { in from()
681 status.to_h2_error() in from()
772 let status = Status::new(code, msg); in infer_grpc_status() localVariable
[all …]
H A Dlib.rs112 mod status; module
125 pub use status::{Code, ConnectError, Status, TimeoutExpired};
/tonic/tonic-web/src/
H A Dservice.rs145 fn immediate(status: StatusCode) -> Self { in immediate()
147 .status(status) in immediate()
305 assert_eq!(res.status(), StatusCode::OK); in default_cors_config()
313 assert_eq!(res.status(), StatusCode::OK); in web_layer()
325 assert_eq!(res.status(), StatusCode::OK); in without_origin()
345 res.status(), in only_post_and_options_allowed()
364 assert_eq!(res.status(), StatusCode::OK); in grpc_web_content_types()
387 assert_eq!(res.status(), StatusCode::OK); in valid_grpc_web_preflight()
409 assert_eq!(res.status(), StatusCode::OK) in h2_is_ok()
438 assert_eq!(res.status(), StatusCode::OK) in content_type_variants()
[all …]
/tonic/interop/src/
H A Dclient.rs238 Err(status) => status.code() == Code::Unknown, in status_code_and_message()
247 Err(status) => status.message() == TEST_STATUS_MESSAGE, in status_code_and_message()
300 Err(status) => status.code() == Code::Unknown, in special_status_message()
309 Err(status) => status.message() == SPECIAL_TEST_STATUS_MESSAGE, in special_status_message()
321 Err(status) => status.code() == Code::Unimplemented, in unimplemented_method()
336 Err(status) => status.code() == Code::Unimplemented, in unimplemented_service()
H A Dserver.rs35 let status = Status::new(Code::from_i32(echo_status.code), echo_status.message); in unary_call() localVariable
36 return Err(status); in unary_call()
42 let status = Status::new(Code::InvalidArgument, "response_size cannot be negative"); in unary_call() localVariable
43 return Err(status); in unary_call()
114 let status = Status::new(Code::from_i32(echo_status.code), echo_status.message); in full_duplex_call() localVariable
115 return Err(status); in full_duplex_call()
124 … let status = Status::new(Code::from_i32(echo_status.code), echo_status.message); in full_duplex_call() localVariable
125 Err(status)?; in full_duplex_call()
/tonic/tonic/src/service/
H A Dinterceptor.rs151 Err(status) => ResponseFuture::status(status), in call()
179 fn status(status: Status) -> Self { in status() method
181 kind: Kind::Status(Some(status)), in status()
202 KindProj::Status(status) => { in poll()
203 let (parts, ()) = status.take().unwrap().into_http::<()>().into_parts(); in poll()
324 assert_eq!(expected.status(), response.status()); in handles_intercepted_status_as_response()
/tonic/tests/web/tests/
H A Dgrpc.rs92 assert!(status(&s1) == status(&s2) && status(&s2) == status(&s3) && status(&s3) == status(&s4)) in smoke_error()
163 fn status(s: &tonic::Status) -> (String, tonic::Code) { in status() function
/tonic/tests/compression/src/
H A Dcompressing_request.rs168 let status = client in client_enabled_server_disabled() localVariable
175 assert_eq!(status.code(), tonic::Code::Unimplemented); in client_enabled_server_disabled()
183 status.message(), in client_enabled_server_disabled()
191 status.metadata().get("grpc-accept-encoding").unwrap(), in client_enabled_server_disabled()
227 let status = client in client_mark_compressed_without_header_server_enabled() localVariable
234 assert_eq!(status.code(), tonic::Code::Internal); in client_mark_compressed_without_header_server_enabled()
236 status.message(), in client_mark_compressed_without_header_server_enabled()
/tonic/examples/src/richer-error/
H A Dclient.rs25 Err(status) => { in main()
28 let err_details = status.get_error_details(); in main()
H A Dclient_vec.rs25 Err(status) => { in main()
28 let err_details = status.get_error_details_vec(); in main()
H A Dserver.rs42 let status = Status::with_error_details( in say_hello() localVariable
48 return Err(status); in say_hello()
H A Dserver_vec.rs42 let status = Status::with_error_details_vec( in say_hello() localVariable
48 return Err(status); in say_hello()
/tonic/tonic/src/client/
H A Dgrpc.rs249 .map_err(|mut status| { in client_streaming()
250 status.metadata_mut().merge(parts.clone()); in client_streaming()
251 status in client_streaming()
338 let status_code = response.status(); in create_response()
343 let expect_additional_trailers = if let Some(status) = trailers_only_status { in create_response()
344 if status.code() != Code::Ok { in create_response()
345 return Err(status); in create_response()
/tonic/interop/proto/grpc/testing/
H A Dmessages.proto45 // A protobuf representation for grpc status. This is used by test
46 // clients to specify a status that the server should attempt to return.
74 // the response's compression status.
77 // Whether server should return a given status
103 // the request's compression status.
127 // the response's compression status.
146 // Whether server should return a given status
/tonic/tests/integration_tests/tests/
H A Duser_agent.rs53 Err(status) => panic!("{}", status.message()), in writes_user_agent_header()
H A Dmax_message_size.rs246 (Some(code), Err(status)) => { in assert_test_case()
247 if status.code() != code { in assert_test_case()
250 status in assert_test_case()
255 (None, Err(status)) => panic!("Expected success, but got failure, got: {:?}", status), in assert_test_case()
/tonic/tonic/src/server/
H A Dgrpc.rs20 Err(status) => return status.into_http(),
236 Err(status) => { in unary()
238 Err(status), in unary()
280 Err(status) => { in server_streaming()
282 Err(status), in server_streaming()
/tonic/tonic-types/proto/
H A Dstatus.proto22 option go_package = "google.golang.org/genproto/googleapis/rpc/status;status";
36 // The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
/tonic/tonic-types/
H A DREADME.md15 be used on the server side to create a status with error details, which can then
53 // Check if any error details were set and return error status if so
60 let status = Status::with_error_details(
65 return Err(status);
85 Err(status) => {
86 let err_details = status.get_error_details();
/tonic/examples/src/h2c/
H A Dclient.rs73 if res.status() != http::StatusCode::SWITCHING_PROTOCOLS { in call()
74 panic!("Our server didn't upgrade: {}", res.status()); in call()

12