cobalt
cobalt copied to clipboard
Suggestion: Health-check example
Async could provide a health check as an example since it is simple enough to implement and useful in general. Constraints
- Ping the server periodically (can be a http endpoint).
- Use only one timer.
- The timer should not be cancelled.
- On expiration the timer should exit with success.
The interface could look like
co_await health_check(connection, std::chrono::seconds{1});
I am not sure I get what this supposed to do.