PlugAttack.Storage behaviour (plug_attack v0.4.3)
Behaviour for the storage backend for various rules.
Link to this section Summary
Link to this section Types
Link to this type
key()
Specs
key() :: term()
Link to this type
opts()
Specs
opts() :: term()
Link to this type
time()
Specs
time() :: non_neg_integer()
Time of milliseconds since unix epoch.
Link to this section Callbacks
Link to this callback
increment(opts, key, inc, expires_at)
Specs
Link to this callback
read(opts, key, now)
Specs
Link to this callback
read_sliding_counter(opts, key, now)
Specs
read_sliding_counter(opts(), key(), now :: time()) :: non_neg_integer()
Link to this callback
write(opts, key, value, expires_at)
Specs
Link to this callback