jina.serve.runtimes.gateway.http.app module#

jina.serve.runtimes.gateway.http.app.get_fastapi_app(args, topology_graph, connection_pool, logger, metrics_registry=None)[source]#

Get the app from FastAPI as the REST interface.

Parameters
  • args (argparse.Namespace) – passed arguments.

  • topology_graph (TopologyGraph) – topology graph that manages the logic of sending to the proper executors.

  • connection_pool (GrpcConnectionPool) – Connection Pool to handle multiple replicas and sending to different of them

  • logger (JinaLogger) – Jina logger.

  • metrics_registry (Optional[ForwardRef]) – optional metrics registry for prometheus used if we need to expose metrics from the executor or from the data request handler

Returns

fastapi app