DurableObjectBrokerTransportOptions
The DurableObjectBrokerTransportOptions type describes the options for creating a broker transport for Cloudflare Durable Objects.
(
{
path?: string | null;
brokerPaths?: RegExp;
} &
DurableObjectTransportOptions
)| Type | Description | |
|---|---|---|
path? | string | null | The path that this Durable Object will participate in as a synclet. Set to |
brokerPaths? | RegExp | A regular expression pattern that determines which paths this broker will accept and route. Clients connecting to paths that don't match this pattern will be rejected. Defaults to accept all paths. |
Example
const transport = createDurableObjectBrokerTransport({
durableObject: this,
path: null, // Broker-only mode
brokerPaths: /room[0-9]+/, // Only broker paths matching this pattern
});
Since
v0.0.7