Rivet.Cluster reference
Cluster
Section titled “Cluster”Source:
packages/rivet/src/Cluster.ts
A Rivet control plane that already runs elsewhere — Rivet Cloud, or one
you operate — as a Rivet.Cluster Layer. Unless namespace is set, a
Rivet.Namespace is created for the stage.
Cluster: Using an existing control plane
Section titled “Cluster: Using an existing control plane”export const Cluster = Rivet.ControlPlane("Rivet", { endpoint: "https://rivet.example.com", token: Config.Redacted("RIVET_TOKEN"),});Cluster: Reaching it at a private address
Section titled “Cluster: Reaching it at a private address”export const Cluster = Rivet.ControlPlane("Rivet", { endpoint: "https://rivet.example.com", token: Config.Redacted("RIVET_TOKEN"), nodeEndpoint: "http://10.0.0.2:6420", network: RivetGCP.Network(GCP.Compute.Subnetwork.lookup({ subnetworkName: "rivet" })),});
// Joins the "rivet" subnetwork's network and connects its nodes to nodeEndpoint.export const Default = RivetGCP.CloudRunPool("Default").pipe(Layer.provide(Cluster));