Skip to main content

Interface: OutboxQueue

Defined in: contract.ts:104

@rasd/storage — the public entry point.

This package owns three things and nothing else: the frozen StorageAdapter contract, a reference implementation of it, and the suite that proves any other implementation matches. It deliberately has no dependency on @rasd/license — that is what makes export() available in every licence state a property of the module graph rather than a promise (docs/09 §10).

Methods

ack()

ack(ids): Promise<void>;

Defined in: contract.ts:108

Parameters

ParameterType
idsstring[]

Returns

Promise<void>


enqueue()

enqueue(op): Promise<OutboxOp>;

Defined in: contract.ts:105

Parameters

ParameterType
opOmit<OutboxOp, "attempts" | "nextAttemptAt" | "createdAt"> & Partial<OutboxOp>

Returns

Promise<OutboxOp>


fail()

fail(
id,
err,
nextAttemptAt
): Promise<void>;

Defined in: contract.ts:109

Parameters

ParameterType
idstring
err{ code: string; message: string; }
err.codestring
err.messagestring
nextAttemptAtstring

Returns

Promise<void>


peek()

peek(n): Promise<OutboxOp[]>;

Defined in: contract.ts:107

Due operations in priority order, oldest first.

Parameters

ParameterType
nnumber

Returns

Promise<OutboxOp[]>


size()

size(): Promise<number>;

Defined in: contract.ts:110

Returns

Promise<number>