Update /ok to serve dual health check/benchmarking role
This commit is contained in:
@@ -32,6 +32,19 @@ struct StatusEntry {
|
||||
: connection(std::move(conn)) {}
|
||||
};
|
||||
|
||||
/**
|
||||
* Pipeline entry for /ok health check requests.
|
||||
* Flows through all pipeline stages as a noop except resolve stage.
|
||||
* Resolve stage can perform configurable CPU work for benchmarking.
|
||||
*/
|
||||
struct HealthCheckEntry {
|
||||
std::unique_ptr<Connection> connection;
|
||||
|
||||
HealthCheckEntry() = default; // Default constructor for variant
|
||||
explicit HealthCheckEntry(std::unique_ptr<Connection> conn)
|
||||
: connection(std::move(conn)) {}
|
||||
};
|
||||
|
||||
/**
|
||||
* Pipeline entry for coordinated shutdown of all stages.
|
||||
* Flows through all stages to ensure proper cleanup.
|
||||
@@ -44,4 +57,5 @@ struct ShutdownEntry {
|
||||
* Pipeline entry variant type used by the commit processing pipeline.
|
||||
* Each stage pattern-matches on the variant type to handle appropriately.
|
||||
*/
|
||||
using PipelineEntry = std::variant<CommitEntry, StatusEntry, ShutdownEntry>;
|
||||
using PipelineEntry =
|
||||
std::variant<CommitEntry, StatusEntry, HealthCheckEntry, ShutdownEntry>;
|
||||
Reference in New Issue
Block a user