ores.cpp.nats-event-registrar.nats_event_registrar_header

Table of Contents

This page is the node for the ores.cpp.nats-event-registrar.nats_event_registrar_header archetype in the codegen physical-space address graph. Its title is its MASD address; it generates one output artefact and owns the mustache source below, tangled to the sibling .mustache consumed by generator.py. Edit this document, then run the tangle (compass build --direct tangle_codegen_templates).

Summary

Per-entity event-mapping registrar header declaring register_<entity>_event_mapping(). Lives in the .service layer (not .core, where the request/response sub-registrar lives) because the Postgres LISTEN/NOTIFY-to-NATS pipeline depends on ores.eventing.core (postgres_event_source, event_bus), which no .core component links.

The ores.cpp.nats-event-registrar.nats_event_registrar_header archetype

{{! GENERATED FILE — tangled from projects/ores.codegen/library/templates/ores.cpp.nats-event-registrar.nats_event_registrar_header.org. Edit the org source. }}
{{{cpp_license}}}
{{#domain_entity}}
#ifndef ORES_{{component_service_upper}}_MESSAGING_{{entity_singular_upper}}_EVENT_REGISTRAR_HPP
#define ORES_{{component_service_upper}}_MESSAGING_{{entity_singular_upper}}_EVENT_REGISTRAR_HPP

#include "ores.eventing.api/service/event_bus.hpp"
#include "ores.eventing.core/service/postgres_event_source.hpp"
#include "ores.nats/service/client.hpp"

namespace ores::{{component}}::service::messaging {

[[nodiscard]] ores::eventing::service::subscription
register_{{entity_singular}}_event_mapping(ores::eventing::service::postgres_event_source& event_source,
                                           ores::eventing::service::event_bus& event_bus,
                                           ores::nats::service::client& nats);

} // namespace ores::{{component}}::service::messaging

#endif
{{/domain_entity}}

See also

Emacs 29.3 (Org mode 9.6.15)