Skip to content

TypeScript Runtimes

InterfacePurpose
runta.runtimes.create(name, options)Create a runtime.
runta.runtimes.list(status?)List runtimes, optionally filtered by status.
runta.runtimes.get(idOrName)Fetch one runtime by UUID or display name.
const runtime = await runta.runtimes.create("worker", {
vcpus: 1,
memoryMiB: 1024,
idleSuspendAfterSecs: 300,
});
const running = await runta.runtimes.list("running");
const byId = await runta.runtimes.get("runtime-id");
const byName = await runta.runtimes.get("runtime-display-name");
MethodPurpose
runtime.start()Boot a stopped runtime.
runtime.stop()Stop a runtime.
runtime.delete()Delete a runtime.
runtime.restore(checkpointId, options)Restore a new runtime from a checkpoint.
await runtime.start();
await runtime.stop();
await runtime.delete();

Restore from a checkpoint:

const restored = await runtime.restore(checkpoint.id, {
name: "worker-restored",
});