Private
Optional
observerPrivate
storeAttach an observer that reacts to the pings storage changes.
The new observer to attach.
Private
getDelete surplus of pings in the database by count or database size and return list of remaining pings. Pings are deleted from oldest to newest.
The size of the database will be calculated (by accumulating each ping's size in bytes) and in case the quota is exceeded, outstanding pings get deleted.
Note: deletion-request
pings are never deleted.
The max number of pings in the database. Default: 250.
The max size of the database (in bytes). Default: 10MB.
List of all currently stored pings, in ascending order by date.
deletion-request
pings are always in the front of the list.
Records a new ping to the ping database.
The path where this ping must be submitted to.
The identifier under which to store the ping.
The payload of the ping to record.
Optional
headers: Record<string, string>Optional headers to include on the final ping request.
Scans the database for pending pings and enqueues them.
This function will also clear off pings in case the database is exceeding the ping or size quota.
Generated using TypeDoc
The pings database is an abstraction layer on top of the underlying storage.
Ping data is saved to the database in the following format:
{ "": {
"path": string,
"payload": PingPayload,
"headers": PingHeaders,
}
}