Class: SqlDurableInbox<T>
Defined in: packages/agentos/src/io/channels/meetings/DurableInbox.ts:56
The sealer keeps credentials in pending deliveries encrypted at rest.
Type Parameters
T
T
Implements
Constructors
Constructor
new SqlDurableInbox<
T>(db,prefix,box):SqlDurableInbox<T>
Defined in: packages/agentos/src/io/channels/meetings/DurableInbox.ts:63
Parameters
db
InboxDb
The database holding the table durableInboxDdl makes.
prefix
string
The prefix the table was made under.
box
Seals each payload before it is stored and opens it on read (a SecretBox, for one).
open
seal
Returns
SqlDurableInbox<T>
Methods
accept()
accept(
entry):Promise<boolean>
Defined in: packages/agentos/src/io/channels/meetings/DurableInbox.ts:67
Stores a new entry; false, and nothing changes, when an entry with its id was accepted before (acknowledged or not).
Parameters
entry
InboxEntry<T>
Returns
Promise<boolean>
Implementation of
acknowledge()
acknowledge(
id):Promise<void>
Defined in: packages/agentos/src/io/channels/meetings/DurableInbox.ts:78
Drops the entry's payload once the receiver has acted on it; its id stays, so a replay is still refused.
Parameters
id
string
Returns
Promise<void>
Implementation of
pending()
pending():
Promise<InboxEntry<T>[]>
Defined in: packages/agentos/src/io/channels/meetings/DurableInbox.ts:73
The entries accepted and not yet acknowledged, oldest first.
Returns
Promise<InboxEntry<T>[]>