Liking cljdoc? Tell your friends :D

congestion.storage


local-storageclj

(local-storage & [backing-atom])

Instantiate a new LocalStorage storage implementation.

Accepts an optional atom wrapping a map. This allows the same atom to be shared by multiple LocalStorage instances.

If an argument is not provided, a new atom will be created.

Instantiate a new LocalStorage storage implementation.

Accepts an optional atom wrapping a map. This allows the same atom
to be shared by multiple LocalStorage instances.

If an argument is not provided, a new atom will be created.
sourceraw docstring

prefixclj

source

redis-storageclj

(redis-storage conn-opts)
source

Storagecljprotocol

A protocol describing the interface for storage backends.

get-count is used to read the current counter value for a given key.

increment-count is used to increment the counter for a given key. This function is responsible also for creating the counter if it doesn't exist already, and for scheduling the counter to expire after the provided delay.

counter-expiry is used to return a timestamp of when the counter will expire, ie when the rate limit is reset again.

A protocol describing the interface for storage backends.

`get-count` is used to read the current counter value for a given key.

`increment-count` is used to increment the counter for a given
key. This function is responsible also for creating the counter if
it doesn't exist already, and for scheduling the counter to expire
after the provided delay.

`counter-expiry` is used to return a timestamp of when the counter
will expire, ie when the rate limit is reset again.

clear-countersclj

(clear-counters self)

counter-expiryclj

(counter-expiry self key)

get-countclj

(get-count self key)

increment-countclj

(increment-count self key ttl)
sourceraw docstring

ttl-incr-scriptclj

source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close