feat(storage): Add delivery state store switch (D1 by default or KV) (#12)

This commit is contained in:
w9auto committed 2026-11-17 22:46:50 +08:00
1 parent fc4495dfb4
commit 0c126d4fee
21 files changed
+756 -184

No files matched your search

+6
View File
@@ -31,6 +31,12 @@ export interface Env {
ALLOW_SELF_SIGNUP?: string;
/** Audit log retention in days (default 90). */
AUDIT_RETENTION_DAYS?: string;
/**
* Where webhook delivery state is kept: `d1` (default) or `kv`. D1 allows
* far more free writes but each one is a database round trip; KV answers at
* the edge and is best effort (no compare-and-set).
*/
DELIVERY_STATE_STORE?: string;
ASSETS?: Fetcher;
KV: KVNamespace;
DB: D1Database;