Catalog of conduit event types.
More...
#include <event_type_registry.hpp>
|
| | EventTypeRegistry ()=default |
| |
| template<typename T > |
| EventTypeRegistry & | add () |
| | Register the descriptor for event type T (derived from conduit::Event<T, Name>, hence an ICell-derived cell).
|
| |
| std::vector< EventTypeInfo > | types () const |
| | All registered event types (descriptors whose kind starts with event_kind_prefix; parcel builtins are filtered out).
|
| |
| std::optional< EventTypeInfo > | find (const std::string_view name_or_kind) const |
| | Look up a type by bare name ("order.created") or full kind ("conduit:event:order.created").
|
| |
| bool | contains (const std::string_view name_or_kind) const |
| | Whether a type with the given name or kind is registered.
|
| |
| parcel::json_t | schema (const std::string_view name_or_kind) const |
| | Per-type JSON schema for the given name or kind.
|
| |
Catalog of conduit event types.
Wraps a parcel::ParcelRegistry (default constructed, so the builtin field/primitive kinds are present and schema work resolves) behind a std::shared_mutex — shared lock for reads, unique lock for add. Standalone-usable; the process-wide instance is global_event_types().
◆ EventTypeRegistry()
| conduit::EventTypeRegistry::EventTypeRegistry |
( |
| ) |
|
|
default |
◆ add()
Register the descriptor for event type T (derived from conduit::Event<T, Name>, hence an ICell-derived cell).
◆ contains()
| bool conduit::EventTypeRegistry::contains |
( |
const std::string_view |
name_or_kind | ) |
const |
|
inline |
Whether a type with the given name or kind is registered.
◆ find()
| std::optional< EventTypeInfo > conduit::EventTypeRegistry::find |
( |
const std::string_view |
name_or_kind | ) |
const |
|
inline |
Look up a type by bare name ("order.created") or full kind ("conduit:event:order.created").
Returns std::nullopt if unknown.
◆ schema()
| parcel::json_t conduit::EventTypeRegistry::schema |
( |
const std::string_view |
name_or_kind | ) |
const |
|
inline |
Per-type JSON schema for the given name or kind.
- Exceptions
-
◆ types()
| std::vector< EventTypeInfo > conduit::EventTypeRegistry::types |
( |
| ) |
const |
|
inline |
All registered event types (descriptors whose kind starts with event_kind_prefix; parcel builtins are filtered out).
The documentation for this class was generated from the following file: