@nikositech/subscriptions-handler
v1.0.0
Published
- configure(redisConfig, types = [])
Downloads
1
Readme
@nikositech/subscriptions-handler
configure(redisConfig, types = [])
updateLimit(ref, type, value)
updateUsage(ref, type, value)
getUsage(ref, type)
getLimit(ref, type)
deleteSubscription(ref)
getAll(ref)
checkValue(ref, type) : returns LIMIT >= USAGE
canAddValue(ref, type) : returns USAGE > LIMIT
getByType(ref, type) : returns {limit, usage} of a type
incrementUsage(ref, type) : +1 of USAGE
decrementUsage(ref, type)