#pragma once
#include <atomic>
#include "service_config.h"
/// Long-lived monitored service. Configuration must remain unchanged while
/// tasks use it, and the service must outlive those tasks.
struct Service
{
/// Settings owned by this runtime service.
ServiceConfig config;
/// Set when a task is dispatched and cleared when that task finishes.
std::atomic<bool> in_flight{false};
/// Create a fresh task-owned probe without changing in_flight.
mw::E<std::unique_ptr<ProbeInterface>> createProbe() const;
};