├── .github ├── dependabot.yml └── workflows │ ├── benchmark.yml │ ├── ci.yml │ ├── ci_rust.yml │ ├── coverage.yml │ ├── release_pr_for_crates_io.yml │ └── release_to_crates_io.yml ├── .gitignore ├── .idea ├── .gitignore ├── codeStyles │ └── codeStyleConfig.xml ├── dictionaries │ └── asf.xml ├── misc.xml ├── modules.xml ├── ratelimit_meter_rewrite.iml ├── runConfigurations │ └── test.xml └── vcs.xml ├── CONTRIBUTING.md ├── Cargo.toml ├── CoC.md ├── LICENSE ├── README.md ├── bors.toml ├── deny.toml ├── governor ├── CHANGELOG.md ├── Cargo.toml ├── README.md ├── benches │ ├── governor_criterion_benches.rs │ ├── multi_threaded.rs │ ├── realtime_clock.rs │ └── single_threaded.rs ├── doc │ └── centrifugal-governor.png ├── release.toml ├── src │ ├── _guide.rs │ ├── clock.rs │ ├── clock │ │ ├── default.rs │ │ ├── quanta.rs │ │ └── with_std.rs │ ├── errors.rs │ ├── gcra.rs │ ├── jitter.rs │ ├── lib.rs │ ├── middleware.rs │ ├── nanos.rs │ ├── quota.rs │ ├── state.rs │ └── state │ │ ├── direct.rs │ │ ├── direct │ │ ├── future.rs │ │ ├── sinks.rs │ │ └── streams.rs │ │ ├── in_memory.rs │ │ ├── keyed.rs │ │ └── keyed │ │ ├── dashmap.rs │ │ ├── future.rs │ │ └── hashmap.rs └── tests │ ├── custom_hashers.rs │ ├── direct.rs │ ├── future.rs │ ├── keyed.rs │ ├── keyed_dashmap.rs │ ├── keyed_hashmap.rs │ ├── memory_leaks.rs │ ├── middleware.rs │ ├── proptests.regressions │ ├── proptests.rs │ ├── sinks.rs │ └── streams.rs └── release.toml /.github/dependabot.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/.github/dependabot.yml -------------------------------------------------------------------------------- /.github/workflows/benchmark.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/.github/workflows/benchmark.yml -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/.github/workflows/ci.yml -------------------------------------------------------------------------------- /.github/workflows/ci_rust.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/.github/workflows/ci_rust.yml -------------------------------------------------------------------------------- /.github/workflows/coverage.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/.github/workflows/coverage.yml -------------------------------------------------------------------------------- /.github/workflows/release_pr_for_crates_io.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/.github/workflows/release_pr_for_crates_io.yml -------------------------------------------------------------------------------- /.github/workflows/release_to_crates_io.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/.github/workflows/release_to_crates_io.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | **/*.rs.bk 3 | Cargo.lock 4 | -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /workspace.xml -------------------------------------------------------------------------------- /.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/.idea/codeStyles/codeStyleConfig.xml -------------------------------------------------------------------------------- /.idea/dictionaries/asf.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/.idea/dictionaries/asf.xml -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/.idea/misc.xml -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/.idea/modules.xml -------------------------------------------------------------------------------- /.idea/ratelimit_meter_rewrite.iml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/.idea/ratelimit_meter_rewrite.iml -------------------------------------------------------------------------------- /.idea/runConfigurations/test.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/.idea/runConfigurations/test.xml -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/.idea/vcs.xml -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/CONTRIBUTING.md -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/Cargo.toml -------------------------------------------------------------------------------- /CoC.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/CoC.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/README.md -------------------------------------------------------------------------------- /bors.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/bors.toml -------------------------------------------------------------------------------- /deny.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/deny.toml -------------------------------------------------------------------------------- /governor/CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/governor/CHANGELOG.md -------------------------------------------------------------------------------- /governor/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/governor/Cargo.toml -------------------------------------------------------------------------------- /governor/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/governor/README.md -------------------------------------------------------------------------------- /governor/benches/governor_criterion_benches.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/governor/benches/governor_criterion_benches.rs -------------------------------------------------------------------------------- /governor/benches/multi_threaded.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/governor/benches/multi_threaded.rs -------------------------------------------------------------------------------- /governor/benches/realtime_clock.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/governor/benches/realtime_clock.rs -------------------------------------------------------------------------------- /governor/benches/single_threaded.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/governor/benches/single_threaded.rs -------------------------------------------------------------------------------- /governor/doc/centrifugal-governor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/governor/doc/centrifugal-governor.png -------------------------------------------------------------------------------- /governor/release.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/governor/release.toml -------------------------------------------------------------------------------- /governor/src/_guide.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/governor/src/_guide.rs -------------------------------------------------------------------------------- /governor/src/clock.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/governor/src/clock.rs -------------------------------------------------------------------------------- /governor/src/clock/default.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/governor/src/clock/default.rs -------------------------------------------------------------------------------- /governor/src/clock/quanta.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/governor/src/clock/quanta.rs -------------------------------------------------------------------------------- /governor/src/clock/with_std.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/governor/src/clock/with_std.rs -------------------------------------------------------------------------------- /governor/src/errors.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/governor/src/errors.rs -------------------------------------------------------------------------------- /governor/src/gcra.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/governor/src/gcra.rs -------------------------------------------------------------------------------- /governor/src/jitter.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/governor/src/jitter.rs -------------------------------------------------------------------------------- /governor/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/governor/src/lib.rs -------------------------------------------------------------------------------- /governor/src/middleware.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/governor/src/middleware.rs -------------------------------------------------------------------------------- /governor/src/nanos.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/governor/src/nanos.rs -------------------------------------------------------------------------------- /governor/src/quota.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/governor/src/quota.rs -------------------------------------------------------------------------------- /governor/src/state.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/governor/src/state.rs -------------------------------------------------------------------------------- /governor/src/state/direct.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/governor/src/state/direct.rs -------------------------------------------------------------------------------- /governor/src/state/direct/future.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/governor/src/state/direct/future.rs -------------------------------------------------------------------------------- /governor/src/state/direct/sinks.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/governor/src/state/direct/sinks.rs -------------------------------------------------------------------------------- /governor/src/state/direct/streams.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/governor/src/state/direct/streams.rs -------------------------------------------------------------------------------- /governor/src/state/in_memory.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/governor/src/state/in_memory.rs -------------------------------------------------------------------------------- /governor/src/state/keyed.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/governor/src/state/keyed.rs -------------------------------------------------------------------------------- /governor/src/state/keyed/dashmap.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/governor/src/state/keyed/dashmap.rs -------------------------------------------------------------------------------- /governor/src/state/keyed/future.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/governor/src/state/keyed/future.rs -------------------------------------------------------------------------------- /governor/src/state/keyed/hashmap.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/governor/src/state/keyed/hashmap.rs -------------------------------------------------------------------------------- /governor/tests/custom_hashers.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/governor/tests/custom_hashers.rs -------------------------------------------------------------------------------- /governor/tests/direct.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/governor/tests/direct.rs -------------------------------------------------------------------------------- /governor/tests/future.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/governor/tests/future.rs -------------------------------------------------------------------------------- /governor/tests/keyed.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/governor/tests/keyed.rs -------------------------------------------------------------------------------- /governor/tests/keyed_dashmap.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/governor/tests/keyed_dashmap.rs -------------------------------------------------------------------------------- /governor/tests/keyed_hashmap.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/governor/tests/keyed_hashmap.rs -------------------------------------------------------------------------------- /governor/tests/memory_leaks.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/governor/tests/memory_leaks.rs -------------------------------------------------------------------------------- /governor/tests/middleware.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/governor/tests/middleware.rs -------------------------------------------------------------------------------- /governor/tests/proptests.regressions: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/governor/tests/proptests.regressions -------------------------------------------------------------------------------- /governor/tests/proptests.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/governor/tests/proptests.rs -------------------------------------------------------------------------------- /governor/tests/sinks.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/governor/tests/sinks.rs -------------------------------------------------------------------------------- /governor/tests/streams.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/governor/tests/streams.rs -------------------------------------------------------------------------------- /release.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boinkor-net/governor/HEAD/release.toml --------------------------------------------------------------------------------