basalt / drives/src / MemoryReplayGuard
Class: MemoryReplayGuard
Defined in: drives/src/notifications.ts:68
In-memory replay guard — fine for one process, not for a cluster.
Implements
Constructors
Constructor
> new MemoryReplayGuard(now?): MemoryReplayGuard
Defined in: drives/src/notifications.ts:70
Parameters
now?
() => number
Returns
MemoryReplayGuard
Methods
firstSeen()
> firstSeen(key, ttlMs): Promise<boolean>
Defined in: drives/src/notifications.ts:72
true the first time this key is seen within the window, false afterwards.
Parameters
key
string
ttlMs
number
Returns
Promise<boolean>