now.executor.gateway.now_gateway module#
- class now.executor.gateway.now_gateway.PlaygroundGateway(**kwargs)[source]#
Bases:
BaseGateway
- Parameters
name – Gateway pod name
runtime_args – a dict of arguments injected from
Runtime
during runtimestreamer – GatewayStreamer object to be set if not None
kwargs – additional extra keyword arguments to avoid failing when extra params ara passed that are not expected
- class now.executor.gateway.now_gateway.BFFGateway(ssl_keyfile=None, ssl_certfile=None, uvicorn_kwargs=None, proxy=False, **kwargs)[source]#
Bases:
FastAPIBaseGateway
Initialize the FastAPIBaseGateway :type ssl_keyfile:
Optional
[str
] :param ssl_keyfile: the path to the key file :type ssl_certfile:Optional
[str
] :param ssl_certfile: the path to the certificate file :type uvicorn_kwargs:Optional
[dict
] :param uvicorn_kwargs: Dictionary of kwargs arguments that will be passed to Uvicorn server when starting the server :type proxy:bool
:param proxy: If set, respect the http_proxy and https_proxy environment variables, otherwise, it will unsetthese proxy variables before start. gRPC seems to prefer no proxy
- Parameters
kwargs – keyword args
- property app#
Get a FastAPI app
- class now.executor.gateway.now_gateway.NOWGateway(user_input_dict={}, **kwargs)[source]#
Bases:
CompositeGateway
The NOWGateway assumes that the gateway has been started with http on port 8081. This is the port on which the nginx process listens. After nginx has been started, it will start the playground on port 8501 and the BFF on port 8080. The actual HTTP gateway will start on port 8082. Nginx is configured to route the requests in the following way: - /playground -> playground on port 8501 - /api -> BFF on port 8080 - / -> HTTP gateway on port 8082
Initialize the gateway :param kwargs: keyword args