Skip to main content

reconnectToRuntime

Datalayer Core


Datalayer Core / reconnectToRuntime

Function: reconnectToRuntime()

reconnectToRuntime(runtimeInfo): Promise<IManager>

Defined in: src/services/reconnectToRuntime.ts:38

Reconnects to an existing Datalayer runtime

This function creates a ServiceManager that connects to an already allocated Jupyter server instance using stored runtime information.

Parameters

runtimeInfo

RuntimeInfo

The stored runtime information

Returns

Promise<IManager>

A configured ServiceManager instance

Throws

Error if the reconnection fails

Example

const runtimeInfo = {
runtimeId: 'abc123',
podName: 'jupyter-pod-xyz',
ingress: 'https://jupyter.example.com',
token: 'secret-token'
};
const serviceManager = await reconnectToRuntime(runtimeInfo);
await serviceManager.ready;