Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Skepfyr/little-loadshedder
/ functions
Functions
21 in github.com/Skepfyr/little-loadshedder
⨍
Functions
21
◇
Types & classes
9
↓ 2 callers
Method
forget
Forget the permit, essentially reducing the size of the semaphore by one. Note this does still decrement the size metric.
src/lib.rs:268
↓ 2 callers
Method
layer
(&self, inner: Inner)
src/lib.rs:426
↓ 2 callers
Method
send_req
(&self)
examples/client.rs:65
↓ 1 callers
Function
load
(mut rps: Receiver<u64>, client: Client)
examples/client.rs:136
↓ 1 callers
Method
start
Add ourselves to the queue and wait until we've made it through and have obtained a permit to send the request.
src/lib.rs:107
↓ 1 callers
Method
stop
Register a completed call of the inner service, providing the latency to update the statistics.
src/lib.rs:165
↓ 1 callers
Function
user_input
(rps: Sender<u64>, client: Client)
examples/client.rs:81
Method
average_latency
The current average latency of requests through the inner service, that is ignoring the queue this service adds.
src/lib.rs:326
Method
call
(&mut self, req: Request)
src/lib.rs:377
Method
call
(&mut self, _req: Request<Body>)
examples/microservice.rs:102
Method
concurrency
The current maximum concurrency of requests to the inner service.
src/lib.rs:331
Method
drop
(&mut self)
src/lib.rs:274
Function
main
()
examples/microservice.rs:30
Function
main
()
examples/client.rs:26
Method
new
(ewma_param: f64, target: f64)
src/lib.rs:79
Method
new
(multiplier: Receiver<f64>)
examples/microservice.rs:84
Method
new
(uri: Uri)
examples/client.rs:58
Method
poll_ready
Always ready because there's a queue between this service and the inner one.
src/lib.rs:373
Method
poll_ready
(&mut self, _cx: &mut Context<'_>)
examples/microservice.rs:98
Method
queue_capacity
The current maximum capacity of this service (including the queue).
src/lib.rs:336
Method
queue_len
The current number of requests that have been accepted by this service.
src/lib.rs:342