jina.serve.runtimes.gateway.grpc package#

Module contents#

class jina.serve.runtimes.gateway.grpc.GRPCGatewayRuntime(args, cancel_event=None, **kwargs)[source]#

Bases: GatewayRuntime

Gateway Runtime for gRPC.

async async_setup()[source]#

The async method to setup.

Create the gRPC server and expose the port for communication.

async async_teardown()[source]#

Close the connection pool

async async_cancel()[source]#

The async method to stop server.

async async_run_forever()[source]#

The async running of server.

async process_control(request, *args)[source]#

Should be used to check readiness by sending STATUS ControlRequests. Throws for any other command than STATUS.

Parameters
  • request (ControlRequest) – the ControlRequest, should have command ‘STATUS’

  • args – additional arguments in the grpc call, ignored

Return type

ControlRequest

Returns

will be the original request