TypeScript Secrets and Checkpoints
Secrets
Section titled “Secrets”| Interface | Purpose |
|---|---|
runta.secrets.create(name, value) | Store a tenant credential. |
runta.secrets.list() | List stored secret metadata. |
runta.secrets.get(idOrName) | Fetch stored secret metadata. |
runta.secrets.delete(idOrName) | Delete a stored secret. |
const secret = await runta.secrets.create("github-token", "secret-value");
const allSecrets = await runta.secrets.list();const sameSecret = await runta.secrets.get("github-token");
await runta.secrets.delete(secret.id);Checkpoints
Section titled “Checkpoints”| Interface | Purpose |
|---|---|
runtime.checkpoints.create(kind, name) | Create a runtime checkpoint. |
runtime.restore(checkpointId, options) | Restore a new runtime from a checkpoint. |
const checkpoint = await runtime.checkpoints.create("full", "worker-checkpoint");
const restored = await runtime.restore(checkpoint.id, { name: "worker-restored",});