mako-events
The compile-time CloudEvents catalog for the mako platform.
Every CloudEvents type string exchanged between mako services is a pub const
in this crate, grouped by bounded context (mako, markt, billing,
vertrag, tarif, messwert, invoic, netzbilanz, obs, agent, …).
Producer/consumer drift is a compile error, not a runtime surprise: services
import the constant instead of typing the string.
use markt;
assert_eq!;
Conventions
- Lowercase reverse-DNS:
de.<context>.<noun>.<participle>(de.markt.versorgung.eog-begonnen). German domain nouns keep their spelling; hyphenated nouns stay hyphenated. - Every constant appears in [
all()] — enforced by tests — so catalogs, subscription UIs, and docs can enumerate the full event surface. matches()implements the shared glob matcher (de.markt.*) used by every subscription mechanism (marktd EventBus, agentd triggers, ERP webhooks).- Events that are subscribed but not yet emitted (or vice versa) carry a
⚠ phantom:/orphan emit:doc note at the constant — honest drift tracking instead of silent divergence.
Adding an event
- Add the
pub constto the right context module with a doc comment naming the emitter and consumers. - Append it to
all(). - Emit it via the owning service; consume it via
mako_events::matches().