Skip to main content

Module store

Module store 

Source
Expand description

Where the server keeps the addresses it issued.

An address carries provider state (mail.tm’s JWT, for one) that later calls need. Handing that blob to clients would make GET /v1/inboxes/{addr}/messages impossible to call from plain curl, so the server holds it. cowbird kept it in a dict by default, so a restart lost every live inbox; here a SQLite file keeps them when INTERLOPER_DATABASE is set, and Postgres (INTERLOPER_DATABASE_URL) lets a fleet of servers share them, so any instance serves an address another one issued.

All three backends key by the lowercased address, store the address as JSON, evict an expired row when it is read, and reap the rest in sweep.

Structs§

StoreUnavailable

Enums§

Store