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