Expand description
§iperf3-statuspage
A utility application to serve iperf3 results over an HTTP endpoint.
Re-exports§
pub use models::*;
Modules§
- models
- iperf3-statuspage
Structs§
- Real
Iperf3 Runner - Real iperf3 runner implementation using the
iperf3binary. - iperf3
- HTTP GET endpoint
/iperf3returns the last cached iperf3 result as JSON.
Statics§
- LAST_
RESULT - Global cached iperf3 result and the instant it was cached.
Traits§
- Iperf3
Runner - Trait to abstract running the iperf3 command.
Functions§
- clear_
last_ result_ for_ test - Clears the cached iperf3 result.
- get_
cached_ iperf3_ result - Async function to get the cached iperf3 result or return an error if not available.
- get_
last_ result - Retrieves the last cached iperf3 result, if available.
- min_
frequency_ duration - Reads the environment variable
INTERVAL_MINUTESor returns a default of 10 minutes. - run_
iperf3_ and_ cache_ with_ runner - Runs the iperf3 test using the provided runner, parses the JSON output, and caches the result.
- set_
last_ result_ for_ test - Sets the cached iperf3 result. Used for testing purposes.
- spawn_
iperf3_ scheduler - Background async task which schedules periodic iperf3 runs.