1.0.2 • Published 4 years ago

bedrock-stats-storage-redis v1.0.2

Weekly downloads
16
License
SEE LICENSE IN LI...
Repository
github
Last release
4 years ago

bedrock-stats-storage-redis

API Reference

bedrock-stats-storage-redis

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.

ParamTypeDefaultDescription
optionsObjectThe options to use.
options.monitorIdsArray.<string>The monitorIds to query.
options.endDatenumber | string'+inf'The end date for the query in ms since epoch.
options.startDatenumber | 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.

ParamTypeDescription
optionsObjectThe options to use.
options.reportObjectThe 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.

ParamTypeDescription
optionsObjectThe options to use.
options.beforeDatenumberAll history before this date(ms since epoch) will be removed from history.
1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

5 years ago