UNPKG

@datalayer/core

Version:
124 lines (123 loc) 2.32 kB
import { Kernel } from '@jupyterlab/services'; export declare const BACKWARDS_COMPATIBLE_KERNEL_TYPES_MAP: { default: IRuntimeType; snippet: IRuntimeType; notebook: IRuntimeType; cell: IRuntimeType; }; /** * Error thrown when a runtime has been created * but it can ont be reached. */ export declare class RuntimeUnreachable extends Error { name: string; } /** * Runtime location. */ export type IRuntimeLocation = 'browser' | 'local' | string; /** * Runtime model. */ export interface IRuntimeModel extends IRuntimePod, Kernel.IModel { } /** * Runtime description. */ export interface IRuntimeDesc { /** * Runtime ID. */ id?: string; /** * Runtime Kernel ID. */ kernelId?: string; /** * Runtime name. */ name: string; /** * Runtime language. */ language: string; /** * Runtime location. */ location: IRuntimeLocation; /** * Runtime display name. */ displayName?: string; /** * Runtime parameters. */ params?: Record<string, any>; /** * Runtime credits burning rate. */ burningRate?: number; /** * Runtime Pod name (if applicable). */ podName?: string; } /** * Runtime type. * * TODO refactor with type { RuntimeLocation } */ export type IRuntimeType = 'notebook' | 'cell'; /** * Runtime optional capabilities. */ export type IRuntimeCapabilities = 'user_storage'; /** * Runtime pod. */ export interface IRuntimePod { /** * Environment display name */ environment_title: string; /** * Environment name */ environment_name: string; /** * Runtime name */ pod_name: string; /** * Runtime ingress URL */ ingress: string; /** * Runtime user given name */ given_name: string; /** * Runtime type */ type: IRuntimeType; /** * Server authentication token */ token: string; /** * Credits burning rate per second */ burning_rate: number; /** * Kernel reservation ID */ reservation_id?: string; /** * Runtime usage starting timestamp */ started_at: string; /** * Runtime credits reservation expiration timestamp */ expired_at?: string; }