Synclets logoSynclets

DurableObjectTransportOptions

The DurableObjectTransportOptions type describes the options for creating a broker transport for Cloudflare Durable Objects.

(
  {durableObject: SyncletDurableObject} &
  TransportOptions
)
TypeDescription
durableObjectSyncletDurableObject

The SyncletDurableObject instance that this transport will be associated with. This is required so the transport can access the Durable Object's context for WebSocket handling.

Example

const transport = createDurableObjectTransport({
  durableObject: this,
  path: null, // -only mode
  brokerPaths: /room[0-9]+/, // Only broker paths matching this pattern
});

Since

v0.0.7