interface DurableObjectArm
Since 0.2.0

Wires a Durable Object namespace up as the application's IRealtimeBackplane under CAPABILITIES.REALTIME_BACKPLANE, so WebSocket rooms and SSE channels reach clients on other replicas.

The namespace's class_name must be a Durable Object class the application exports, delegating to RealtimeBackplaneObjectCore. No plugin option can export that class on the application's behalf, which is why the DO class is a documented deliverable rather than an implementation detail.

Registering this arm and RealtimeBackplanePlugin in one application fails at startup: the kernel rejects two providers of one capability token. Register exactly one.

Properties

readonly
binding: string

The Durable Object namespace binding name from wrangler.toml.

readonly
optional
name: string

Instance name. 'default' (the default) claims the bare realtime-backplane token; anything else derives realtime-backplane.<name>.

readonly
optional
topic: string

The object name every replica shares, passed to idFromName.

Two applications sharing one namespace must set different topics, or each receives the other's frames.

Usage

import { type DurableObjectArm } from "cloudflare-plugin/src/index.ts";