def add_generic_rpc_handlers( self, generic_rpc_handlers: Tuple[GenericRpcHandler]) -> None: """Registers GenericRpcHandlers with this Server. This method is only safe to call before the server is started. Args: generic_rpc_handlers: An iterable of GenericRpcHandlers that will be used to service RPCs. :param generic_rpc_handlers: An Tuple of GenericRpcHandlers that will be used to service RPCs. :type generic_rpc_handlers: Tuple[GenericRpcHandler] :rtype: None .. versionadded:: 0.2.1 """ _validate_generic_rpc_handlers(generic_rpc_handlers) _add_generic_handlers(self._state, generic_rpc_handlers)
def add_generic_rpc_handlers(self, generic_rpc_handlers): from grpc._server import _validate_generic_rpc_handlers _validate_generic_rpc_handlers(generic_rpc_handlers) self.rpc_method_handlers.update( generic_rpc_handlers[0]._method_handlers)
def add_generic_rpc_handlers(self, generic_rpc_handlers): _validate_generic_rpc_handlers(generic_rpc_handlers) self.handlers.update(generic_rpc_handlers[0]._method_handlers)