Transport-independent reader and bounded fan-out owner for value-channel telemetry. More...
#include <value_channel_telemetry_broker.hpp>
Classes | |
| struct | Config |
Public Types | |
| using | Clock = std::function<std::chrono::steady_clock::time_point()> |
| using | EventSink = InspectorTargetedEventSink |
| using | EventRetirementSink = InspectorEventRetirementSink |
Public Member Functions | |
| ValueChannelTelemetryBroker () | |
| ValueChannelTelemetryBroker (Config config, Clock clock={}) | |
| ~ValueChannelTelemetryBroker () | |
| ValueChannelTelemetryBroker (ValueChannelTelemetryBroker &&) noexcept | |
| ValueChannelTelemetryBroker & | operator= (ValueChannelTelemetryBroker &&) noexcept |
| ValueChannelTelemetryBroker (const ValueChannelTelemetryBroker &)=delete | |
| ValueChannelTelemetryBroker & | operator= (const ValueChannelTelemetryBroker &)=delete |
| void | set_event_sink (EventSink sink) |
| void | set_event_retirement_sink (EventRetirementSink sink) |
| bool | replace_attachment (view::ValueChannelTelemetryAttachment attachment) |
| Replace the sole-reader attachment. | |
| void | replace_with_empty_source () |
| Record a source generation whose catalog is intentionally empty without retaining a reader attachment. | |
| void | clear_attachment () |
| InspectorMessage | handle (const InspectorRequestContext &context, const InspectorMessage &request) |
| Handle Telemetry.getSnapshot, Telemetry.subscribe, or Telemetry.unsubscribe. | |
| void | poll () |
| Drain the attachment once and emit every due subscription. | |
| void | disconnect (std::string_view client_id) |
| std::size_t | subscription_count () const noexcept |
| std::uint64_t | source_generation () const noexcept |
Transport-independent reader and bounded fan-out owner for value-channel telemetry.
All methods are called serially on one control thread; the attachment remains the sole reader of its telemetry sidecars.
| using pulp::inspect::ValueChannelTelemetryBroker::Clock = std::function<std::chrono::steady_clock::time_point()> |
| using pulp::inspect::ValueChannelTelemetryBroker::EventRetirementSink = InspectorEventRetirementSink |
| pulp::inspect::ValueChannelTelemetryBroker::ValueChannelTelemetryBroker | ( | ) |
|
explicit |
| pulp::inspect::ValueChannelTelemetryBroker::~ValueChannelTelemetryBroker | ( | ) |
|
noexcept |
|
delete |
| void pulp::inspect::ValueChannelTelemetryBroker::clear_attachment | ( | ) |
| void pulp::inspect::ValueChannelTelemetryBroker::disconnect | ( | std::string_view | client_id | ) |
| InspectorMessage pulp::inspect::ValueChannelTelemetryBroker::handle | ( | const InspectorRequestContext & | context, |
| const InspectorMessage & | request ) |
Handle Telemetry.getSnapshot, Telemetry.subscribe, or Telemetry.unsubscribe.
Authenticated identity comes only from context.
|
delete |
|
noexcept |
| void pulp::inspect::ValueChannelTelemetryBroker::poll | ( | ) |
Drain the attachment once and emit every due subscription.
| bool pulp::inspect::ValueChannelTelemetryBroker::replace_attachment | ( | view::ValueChannelTelemetryAttachment | attachment | ) |
Replace the sole-reader attachment.
An invalid attachment explicitly clears the prior source and returns false. Subscriptions retain their channel names and are resolved again against each valid generation.
| void pulp::inspect::ValueChannelTelemetryBroker::replace_with_empty_source | ( | ) |
Record a source generation whose catalog is intentionally empty without retaining a reader attachment.
Existing subscriptions observe the generation transition and resolve their names as unavailable.
| void pulp::inspect::ValueChannelTelemetryBroker::set_event_retirement_sink | ( | EventRetirementSink | sink | ) |
| void pulp::inspect::ValueChannelTelemetryBroker::set_event_sink | ( | EventSink | sink | ) |
|
noexcept |
|
noexcept |