Home
last modified time | relevance | path

Searched refs:servicer_context (Results 1 – 25 of 28) sorted by relevance

12

/third_party/grpc/src/python/grpcio_testing/grpc_testing/_server/
D_service.py46 def _unary_response(argument, implementation, rpc, servicer_context): argument
48 response = implementation(argument, servicer_context)
55 def _stream_response(argument, implementation, rpc, servicer_context): argument
57 response_iterator = implementation(argument, servicer_context)
74 def unary_unary(implementation, rpc, request, servicer_context): argument
75 _unary_response(request, implementation, rpc, servicer_context)
78 def unary_stream(implementation, rpc, request, servicer_context): argument
79 _stream_response(request, implementation, rpc, servicer_context)
82 def stream_unary(implementation, rpc, handler, servicer_context): argument
84 servicer_context)
[all …]
D_server.py33 def service(implementation, rpc, servicer_context): argument
34 _service.unary_unary(implementation, rpc, request, servicer_context)
41 def service(implementation, rpc, servicer_context): argument
42 _service.unary_stream(implementation, rpc, request, servicer_context)
49 def service(implementation, rpc, servicer_context): argument
50 _service.stream_unary(implementation, rpc, handler, servicer_context)
57 def service(implementation, rpc, servicer_context): argument
58 _service.stream_stream(implementation, rpc, handler, servicer_context)
75 servicer_context = _servicer_context.ServicerContext(
81 servicer_context,
/third_party/grpc/src/python/grpcio/grpc/beta/
D_server_adaptations.py37 def __init__(self, servicer_context): argument
38 self._servicer_context = servicer_context
49 def __init__(self, servicer_context): argument
50 self._servicer_context = servicer_context
88 def adaptation(request, servicer_context): argument
90 _FaceServicerContext(servicer_context))
97 def adaptation(request_iterator, servicer_context): argument
99 _FaceServicerContext(servicer_context))
159 servicer_context): argument
164 if not servicer_context.is_active() or thread_joined.is_set():
[all …]
/third_party/grpc/src/python/grpcio_tests/tests/unit/
D_metadata_test.py91 def validate_client_metadata(test, servicer_context): argument
92 invocation_metadata = servicer_context.invocation_metadata()
102 def handle_unary_unary(test, request, servicer_context): argument
103 validate_client_metadata(test, servicer_context)
104 servicer_context.send_initial_metadata(_INITIAL_METADATA)
105 servicer_context.set_trailing_metadata(_TRAILING_METADATA)
109 def handle_unary_stream(test, request, servicer_context): argument
110 validate_client_metadata(test, servicer_context)
111 servicer_context.send_initial_metadata(_INITIAL_METADATA)
112 servicer_context.set_trailing_metadata(_TRAILING_METADATA)
[all …]
D_rpc_test_helpers.py73 def handle_unary_unary(self, request, servicer_context): argument
75 if servicer_context is not None:
76 servicer_context.set_trailing_metadata(((
83 servicer_context.is_active()
84 servicer_context.time_remaining()
87 def handle_unary_stream(self, request, servicer_context): argument
92 if servicer_context is not None:
93 servicer_context.set_trailing_metadata(((
98 def handle_unary_stream_non_blocking(self, request, servicer_context, argument
104 if servicer_context is not None:
[all …]
D_invocation_defects_test.py41 def handle_unary_unary(self, request, servicer_context): argument
43 if servicer_context is not None:
44 servicer_context.set_trailing_metadata(((
50 def handle_unary_stream(self, request, servicer_context): argument
55 if servicer_context is not None:
56 servicer_context.set_trailing_metadata(((
61 def handle_stream_unary(self, request_iterator, servicer_context): argument
62 if servicer_context is not None:
63 servicer_context.invocation_metadata()
70 if servicer_context is not None:
[all …]
D_compression_test.py70 def _handle_unary(request, servicer_context): argument
72 pre_response_callback(request, servicer_context)
80 def _handle_unary_stream(request, servicer_context): argument
82 pre_response_callback(request, servicer_context)
91 def _handle_stream_unary(request_iterator, servicer_context): argument
93 pre_response_callback(request_iterator, servicer_context)
105 def _handle_stream(request_iterator, servicer_context): argument
110 pre_response_callback(request, servicer_context)
117 servicer_context): argument
119 servicer_context.set_compression(compression_method)
[all …]
D_abort_test.py52 def abort_unary_unary(request, servicer_context): argument
54 servicer_context.abort(
61 def abort_with_status_unary_unary(request, servicer_context): argument
62 servicer_context.abort_with_status(
71 def invalid_code_unary_unary(request, servicer_context): argument
72 servicer_context.abort(
D_exit_scenarios.py60 def hang_unary_unary(request, servicer_context): argument
64 def hang_unary_stream(request, servicer_context): argument
68 def hang_partial_unary_stream(request, servicer_context): argument
74 def hang_stream_unary(request_iterator, servicer_context): argument
78 def hang_partial_stream_unary(request_iterator, servicer_context): argument
84 def hang_stream_stream(request_iterator, servicer_context): argument
88 def hang_partial_stream_stream(request_iterator, servicer_context): argument
D_rpc_test.py74 def handle_unary_unary(self, request, servicer_context): argument
76 if servicer_context is not None:
77 servicer_context.set_trailing_metadata(((
84 servicer_context.is_active()
85 servicer_context.time_remaining()
88 def handle_unary_stream(self, request, servicer_context): argument
93 if servicer_context is not None:
94 servicer_context.set_trailing_metadata(((
99 def handle_unary_stream_non_blocking(self, request, servicer_context, argument
105 if servicer_context is not None:
[all …]
D_session_cache_test.py47 def handle_unary_unary(request, servicer_context): argument
49 _ID: servicer_context.peer_identities(),
50 _ID_KEY: servicer_context.peer_identity_key(),
51 _AUTH_CTX: servicer_context.auth_context()
D_interceptor_test.py73 def handle_unary_unary(self, request, servicer_context): argument
75 if servicer_context is not None:
76 servicer_context.set_trailing_metadata(((
84 def handle_unary_stream(self, request, servicer_context): argument
91 if servicer_context is not None:
92 servicer_context.set_trailing_metadata(((
97 def handle_stream_unary(self, request_iterator, servicer_context): argument
98 if servicer_context is not None:
99 servicer_context.invocation_metadata()
106 if servicer_context is not None:
[all …]
D_empty_message_test.py32 def handle_unary_unary(request, servicer_context): argument
36 def handle_unary_stream(request, servicer_context): argument
41 def handle_stream_unary(request_iterator, servicer_context): argument
47 def handle_stream_stream(request_iterator, servicer_context): argument
D_error_message_encoding_test.py47 def unary_unary(self, request, servicer_context): argument
48 servicer_context.set_code(grpc.StatusCode.UNKNOWN)
49 servicer_context.set_details(request.decode('utf-8'))
D_auth_context_test.py54 def handle_unary_unary(request, servicer_context): argument
56 _ID: servicer_context.peer_identities(),
57 _ID_KEY: servicer_context.peer_identity_key(),
58 _AUTH_CTX: servicer_context.auth_context()
D_signal_handling_test.py72 def _handle_unary_unary(self, request, servicer_context): argument
83 servicer_context.add_callback(on_rpc_end)
88 def _handle_unary_stream(self, request, servicer_context): argument
99 servicer_context.add_callback(on_rpc_end)
D_metadata_flags_test.py40 def handle_unary_unary(test, request, servicer_context): argument
44 def handle_unary_stream(test, request, servicer_context): argument
49 def handle_stream_unary(test, request_iterator, servicer_context): argument
55 def handle_stream_stream(test, request_iterator, servicer_context): argument
D_resource_exhausted_test.py68 def handle_unary_unary(trigger, request, servicer_context): argument
73 def handle_unary_stream(trigger, request, servicer_context): argument
79 def handle_stream_unary(trigger, request_iterator, servicer_context): argument
87 def handle_stream_stream(trigger, request_iterator, servicer_context): argument
/third_party/grpc/src/python/grpcio_tests/tests_aio/status/
Dgrpc_status_test.py43 async def _ok_unary_unary(request, servicer_context): argument
47 async def _not_ok_unary_unary(request, servicer_context): argument
48 await servicer_context.abort(grpc.StatusCode.INTERNAL, _STATUS_DETAILS)
51 async def _error_details_unary_unary(request, servicer_context): argument
61 await servicer_context.abort_with_status(rpc_status.to_status(rich_status))
64 async def _inconsistent_unary_unary(request, servicer_context): argument
69 servicer_context.set_code(grpc.StatusCode.NOT_FOUND)
70 servicer_context.set_details(_STATUS_DETAILS_ANOTHER)
72 servicer_context.set_trailing_metadata(
76 async def _invalid_code_unary_unary(request, servicer_context): argument
[all …]
/third_party/grpc/src/python/grpcio_tests/tests/status/
D_grpc_status_test.py52 def _ok_unary_unary(request, servicer_context): argument
56 def _not_ok_unary_unary(request, servicer_context): argument
57 servicer_context.abort(grpc.StatusCode.INTERNAL, _STATUS_DETAILS)
60 def _error_details_unary_unary(request, servicer_context): argument
70 servicer_context.abort_with_status(rpc_status.to_status(rich_status))
73 def _inconsistent_unary_unary(request, servicer_context): argument
78 servicer_context.set_code(grpc.StatusCode.NOT_FOUND)
79 servicer_context.set_details(_STATUS_DETAILS_ANOTHER)
81 servicer_context.set_trailing_metadata(
85 def _invalid_code_unary_unary(request, servicer_context): argument
[all …]
/third_party/grpc/src/python/grpcio_tests/tests/interop/
Dservice.py29 def _maybe_echo_metadata(servicer_context): argument
31 invocation_metadata = dict(servicer_context.invocation_metadata())
35 servicer_context.send_initial_metadata((initial_metadatum,))
39 servicer_context.set_trailing_metadata((trailing_metadatum,))
42 def _maybe_echo_status_and_message(request, servicer_context): argument
45 servicer_context.set_code(request.response_status.code)
46 servicer_context.set_details(request.response_status.message)
/third_party/grpc/src/python/grpcio_tests/tests_aio/unit/
D_test_server.py29 async def _maybe_echo_metadata(servicer_context): argument
31 invocation_metadata = dict(servicer_context.invocation_metadata())
35 await servicer_context.send_initial_metadata((initial_metadatum,))
39 servicer_context.set_trailing_metadata((trailing_metadatum,))
43 servicer_context): argument
46 await servicer_context.abort(request.response_status.code,
Dauth_context_test.py55 servicer_context: aio.ServicerContext):
57 _ID: servicer_context.peer_identities(),
58 _ID_KEY: servicer_context.peer_identity_key(),
59 _AUTH_CTX: servicer_context.auth_context()
/third_party/grpc/src/python/grpcio/grpc/_cython/_cygrpc/aio/
Dserver.pyx.pxi353 _ServicerContext servicer_context, argument
370 servicer_context,
374 sync_servicer_context = _SyncServicerContext(servicer_context)
422 _ServicerContext servicer_context, argument
438 servicer_context,
446 servicer_context,
452 sync_servicer_context = _SyncServicerContext(servicer_context)
463 await servicer_context.write(response_message)
503 cdef _ServicerContext servicer_context = _ServicerContext(
515 servicer_context,
[all …]
/third_party/grpc/src/python/grpcio_tests/tests/channelz/
D_channelz_servicer_test.py41 def _successful_unary_unary(request, servicer_context): argument
45 def _failed_unary_unary(request, servicer_context): argument
46 servicer_context.set_code(grpc.StatusCode.INTERNAL)
47 servicer_context.set_details("Channelz Test Intended Failure")
50 def _successful_stream_stream(request_iterator, servicer_context): argument

12