boostorg / boostorg/cobalt

Suggestion: Health-check example

Open
#2 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
347
Forks
47
Avg merge
3d 8h
Merged PRs (30d)
1

Description

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

```cpp
co_await health_check(connection, std::chrono::seconds{1});
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by inspecting the repository's existing examples and coroutine timer usage, then identify where a health_check example would fit. Use the proposed health_check(connection, duration) interface and verify that it periodically pings an HTTP endpoint with one uncancelled timer, whose expiration exits successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
networking
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.