Skip to content

Commit

Permalink
Fix some more docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmunns committed Aug 29, 2024
1 parent 093049f commit 61f5364
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion source/river/src/proxy/rate_limiting/multi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ where
{
/// Create a new rate limiter with the given configuration.
///
/// See [`RaterConfig`] for configuration options.
/// See [`MultiRaterConfig`] for configuration options.
pub fn new(config: MultiRaterConfig) -> Self {
let MultiRaterConfig {
threads,
Expand Down
2 changes: 1 addition & 1 deletion source/river/src/proxy/rate_limiting/single.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub struct SingleInstance {
impl SingleInstance {
/// Create a new rate limiter with the given configuration.
///
/// See [`RaterConfig`] for configuration options.
/// See [`SingleInstanceConfig`] for configuration options.
pub fn new(config: SingleInstanceConfig, kind: SingleRequestKeyKind) -> Self {
let SingleInstanceConfig {
max_tokens_per_bucket,
Expand Down
7 changes: 4 additions & 3 deletions user-manual/src/config/kdl.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,14 @@ services {
}
}
rate-limiting {
timeout millis=100
rule kind="source-ip" \
max-buckets=4000 tokens-per-bucket=10 refill-qty=1 refill-rate-ms=10
rule kind="uri" pattern="static/.*" \
rule kind="specific-uri" pattern="static/.*" \
max-buckets=2000 tokens-per-bucket=20 refill-qty=5 refill-rate-ms=1
rule kind="any-matching-uri" pattern=r".*\.mp4" \
tokens-per-bucket=50 refill-qty=2 refill-rate-ms=3
}
}
Example3 {
Expand Down

0 comments on commit 61f5364

Please sign in to comment.