Rivet.Namespace reference
Namespace
Section titled “Namespace”Source:
packages/rivet/src/Namespace.ts
A namespace on a Rivet control plane: an isolated set of node pools and actors. Each stage of an app usually gets its own.
Rivet has no API to delete a namespace, so destroying the resource leaves the namespace in place (empty once its pools are gone) and stops managing it.
Namespace: Creating a namespace
Section titled “Namespace: Creating a namespace”const namespace = yield* Rivet.Namespace("App", { endpoint: "https://rivet.example.com", token: Redacted.make(adminToken),});Namespace: Looking up an existing namespace
Section titled “Namespace: Looking up an existing namespace”Namespace.lookup references a namespace Alchemy doesn’t manage (created with
the Rivet API or by another stack). It is read during plan/deploy, never
created, updated or deleted.
const ns = Rivet.Namespace.lookup({ endpoint: "https://rivet.example.com", token: Redacted.make(adminToken), name: "production",});