orangeqs.juice.orchestration.remote_gateway#
JupyterHub-side remote gateway: /hub/tasks, /hub/pub, /hub/sub edges.
Module Contents#
Classes#
In-memory |
|
|
|
|
|
|
Functions#
Return the process-wide acked-names registry. |
|
Return handler routes for |
API#
- class orangeqs.juice.orchestration.remote_gateway.AckedNames#
In-memory
acked-names -> live /hub/tasks connectionmap.- register(name: str, connection: Any) None#
Record that
nameholdsconnectionas its live task socket.
- orangeqs.juice.orchestration.remote_gateway.acked_names() orangeqs.juice.orchestration.remote_gateway.AckedNames#
Return the process-wide acked-names registry.
- class orangeqs.juice.orchestration.remote_gateway.RemoteTasksHandler(application: tornado.web.Application, request: tornado.httputil.HTTPServerRequest, **kwargs: Any)#
Bases:
tornado.websocket.WebSocketHandler/hub/tasks: the remote’s identity socket, reverse-proxied to the task mgr.- initialize(acked: orangeqs.juice.orchestration.remote_gateway.AckedNames | None = None, authenticate: collections.abc.Callable[[str | None], collections.abc.Awaitable[bool]] | None = None) None#
Wire the handler to the acked-names registry and edge-token validator.
- check_origin(origin: str) bool#
Auth is by edge token, not origin, so allow cross-origin connections.
- class orangeqs.juice.orchestration.remote_gateway.RemotePubHandler(application: tornado.web.Application, request: tornado.httputil.HTTPServerRequest, **kwargs: Any)#
Bases:
orangeqs.juice.orchestration.remote_gateway._WebSocketProxyHandler/hub/pub: relay a remote’s published events onto the internal bus.- backend_route#
‘remote-pub’
- class orangeqs.juice.orchestration.remote_gateway.RemoteSubHandler(application: tornado.web.Application, request: tornado.httputil.HTTPServerRequest, **kwargs: Any)#
Bases:
orangeqs.juice.orchestration.remote_gateway._WebSocketProxyHandler/hub/sub: stream internal bus events out to a subscribing remote.- backend_route#
‘remote-sub’