apub-breaker-session 0.2.0

Utilities for building activitypub servers
Documentation
  • Coverage
  • 100%
    3 out of 3 items documented2 out of 3 items with examples
  • Size
  • Source code size: 13.94 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.87 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 36s Average build duration of successful builds.
  • all releases: 36s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • asonix

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));