@datalayer/core
Version:
[](https://datalayer.io)
33 lines (32 loc) • 988 B
TypeScript
import { ServiceManager } from '@jupyterlab/services';
export interface RuntimeInfo {
runtimeId: string;
podName: string;
ingress: string;
token: string;
environmentName?: string;
}
/**
* Reconnects to an existing Datalayer runtime
*
* This function creates a ServiceManager that connects to an already
* allocated Jupyter server instance using stored runtime information.
*
* @param runtimeInfo - The stored runtime information
* @returns A configured ServiceManager instance
* @throws Error if the reconnection fails
*
* @example
* ```typescript
* const runtimeInfo = {
* runtimeId: 'abc123',
* podName: 'jupyter-pod-xyz',
* ingress: 'https://jupyter.example.com',
* token: 'secret-token'
* };
* const serviceManager = await reconnectToRuntime(runtimeInfo);
* await serviceManager.ready;
* ```
*/
export declare const reconnectToRuntime: (runtimeInfo: RuntimeInfo) => Promise<ServiceManager.IManager>;
export default reconnectToRuntime;