2 unstable releases
0.2.0 | Dec 5, 2021 |
---|---|
0.1.0 | Nov 30, 2021 |
#15 in #activity-stream
Used in apub
57KB
1.5K
SLoC
A Session implementation for limiting requests to domains that consistently fail
use apub_breaker_session::BreakerSession;
use std::time::Duration;
// Create a session that refuses requests for an hour after 10 consecutive failures to a given domain
let breaker_session = BreakerSession::limit(10, Duration::from_secs(60 * 60));
Dependencies
~2.2–3.5MB
~60K SLoC