Skip to content

cloudflare

@fungi.computer/carrier


@fungi.computer/carrier / cloudflare

CloudflareCarrierStorage = WatchdogSqliteOwner & Pick<DurableObjectStorage, "transaction" | "getAlarm" | "setAlarm" | "deleteAlarm">>

Native SQLite and alarms; the Cloudflare adapter owns their atomic composition.


CloudflareCarrierOptions = Readonly<{ storage: CloudflareCarrierStorage; canSend?: (emailId) => Promise<boolean>>; }> & Readonly<{ email: SendEmail; transport?: never; }> | Readonly<{ transport: Options["transport"]; email?: never; }>

Native storage/wake composition with exactly one provider capability.


CloudflareCarrier = Pick<Carrier, "send" | "get"> > & Readonly<{ alarm: () => Promise<void>>; }>

Ordinary submission operations and the native Durable Object alarm door.

createCloudflareCarrier(options): Promise<CloudflareCarrier>>

Construct one owner per Durable Object. Forward its native alarm to alarm. Acceptance commits the Email, recipient Messages, Watchdog job and wake together.

CloudflareCarrierOptions

Promise<CloudflareCarrier>