1.0.2 • Published 4 years ago
bedrock-stats-storage-redis v1.0.2
bedrock-stats-storage-redis
API Reference
bedrock-stats-storage-redis
- bedrock-stats-storage-redis
- .find(options) ⇒ Promise.<Object>
- .getMonitorIds() ⇒ Promise.<Array.<string>>
- .insert(options) ⇒ Promise
- .trimHistory(options) ⇒ Promise
bedrock-stats-storage-redis.find(options) ⇒ Promise.<Object>
Query stats history.
Kind: static method of bedrock-stats-storage-redis
Returns: Promise.<Object> - A collated history for the specified monitorIds.
Param | Type | Default | Description |
---|---|---|---|
options | Object | The options to use. | |
options.monitorIds | Array.<string> | The monitorIds to query. | |
options.endDate | number | string | '+inf' | The end date for the query in ms since epoch. |
options.startDate | number | string | '-inf' | The start date for the query in ms since epoch. |
bedrock-stats-storage-redis.getMonitorIds() ⇒ Promise.<Array.<string>>
Get all known monitor IDs.
Kind: static method of bedrock-stats-storage-redis
Returns: Promise.<Array.<string>> - The monitor IDs.
bedrock-stats-storage-redis.insert(options) ⇒ Promise
Insert stats into history.
Kind: static method of bedrock-stats-storage-redis
Returns: Promise - The Redis transaction summary.
Param | Type | Description |
---|---|---|
options | Object | The options to use. |
options.report | Object | The report to insert. |
bedrock-stats-storage-redis.trimHistory(options) ⇒ Promise
Trim stats history.
Kind: static method of bedrock-stats-storage-redis
Returns: Promise - The Redis transaction summary.
Param | Type | Description |
---|---|---|
options | Object | The options to use. |
options.beforeDate | number | All history before this date(ms since epoch) will be removed from history. |