cloudflare
@fungi.computer/carrier / cloudflare
cloudflare
Section titled “cloudflare”Type Aliases
Section titled “Type Aliases”CloudflareCarrierStorage
Section titled “CloudflareCarrierStorage”CloudflareCarrierStorage =
WatchdogSqliteOwner&Pick<DurableObjectStorage,"transaction"|"getAlarm"|"setAlarm"|"deleteAlarm">>
Native SQLite and alarms; the Cloudflare adapter owns their atomic composition.
CloudflareCarrierOptions
Section titled “CloudflareCarrierOptions”CloudflareCarrierOptions =
Readonly<{storage:CloudflareCarrierStorage;canSend?: (emailId) =>Promise<boolean>>; }> &Readonly<{SendEmail;transport?:never; }> |Readonly<{transport:Options["transport"];email?:never; }>
Native storage/wake composition with exactly one provider capability.
CloudflareCarrier
Section titled “CloudflareCarrier”CloudflareCarrier =
Pick<Carrier,"send"|"get"> > &Readonly<{alarm: () =>Promise<void>>; }>
Ordinary submission operations and the native Durable Object alarm door.
Functions
Section titled “Functions”createCloudflareCarrier()
Section titled “createCloudflareCarrier()”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.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”Promise<CloudflareCarrier>