Crate iperf3_statuspage

Source
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§

RealIperf3Runner
Real iperf3 runner implementation using the iperf3 binary.
iperf3
HTTP GET endpoint /iperf3 returns the last cached iperf3 result as JSON.

Statics§

LAST_RESULT
Global cached iperf3 result and the instant it was cached.

Traits§

Iperf3Runner
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_MINUTES or 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.