Synclets logoSynclets

SyncletDurableObject

Extend this class and optionally implement the getCreateDataConnector, getCreateMetaConnector, and getCreateTransport methods to define how your Durable Object stores data and metadata, and how it communicates. The class automatically manages the Synclet lifecycle internally - you don't need to initialize or access the synclet directly.

Optionally implement getCreateImplementations or getCreateOptions to configure custom implementations or other options.

Example

class MySyncletDurableObject extends SyncletDurableObject {
  getCreateDataConnector() {
    return createMemoryDataConnector({depth: 3});
  }
  getCreateMetaConnector() {
    return createMemoryMetaConnector({depth: 3});
  }
  getCreateOptions() {
    return {logLevel: 'debug'};
  }
}

Since

v0.0.0

Constructors

Methods