Penaltybox
pub struct Penaltybox { /* private fields */ }A penaltybox that can be used with the edge rate limiter or stand alone for adding and checking if some entry is in the data set.
Methods
add
View sourceAdd entry to a the penaltybox for the duration of ttl. Valid ttl span is 1m to 1h and TTL value is truncated to the nearest minute.
Parameters
- self: &Self
- entry: &str
- ttl: Duration
Returns
open
View sourcefn open(penaltybox_name: &str) -> SelfOpen a Penaltybox identified by the given name.
Parameters
- penaltybox_name: &str
Returns
Self