conduit 0.6.0
Modern C++23 header-only event-dispatching / event-transport library
Loading...
Searching...
No Matches
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
conduit Namespace Reference

Namespaces

namespace  amqp
 
namespace  detail
 
namespace  flags
 
namespace  local
 
namespace  metrics
 
namespace  mqtt
 
namespace  nats
 
namespace  redis
 
namespace  relay
 
namespace  serialization
 
namespace  zmq
 

Classes

class  Bus
 
class  ConfigError
 Construction-time configuration validation error: a Config field was invalid (empty required field, bad enum, etc.) before any IO happened. More...
 
struct  DefaultFlags
 Mixin marker. More...
 
class  Event
 CRTP library base for conduit events. More...
 
struct  event_traits
 Non-intrusive trait. More...
 
class  EventBuilder
 
class  EventEnvelope
 Polymorphic envelope cell. More...
 
class  EventListener
 Class-based listener — derive and override on_event. More...
 
class  EventRegistry
 Registers event cells for wire decoding. More...
 
class  EventSubscriber
 Multi-event subscriber base. More...
 
struct  EventTypeInfo
 Identity + shape for one registered event type. More...
 
struct  EventTypeRegistrar
 Self-registering object: constructing one registers T into global_event_types(). More...
 
class  EventTypeRegistry
 Catalog of conduit event types. More...
 
class  Exception
 Root of every exception type thrown by conduit. More...
 
class  FilteredTransport
 Wrapper that gates events flowing through an inner transport on both legs. More...
 
class  Glob
 Event-name glob matcher. More...
 
class  Middleware
 
class  SerializationError
 Raised by envelope/cell deserialization when the wire data is malformed. More...
 
class  Subscription
 RAII handle returned by Bus::listen(...). More...
 
struct  Timestamps
 Lifecycle timestamps tracked by the bus / middleware / transports. More...
 
class  TlsNotSupportedError
 TLS-enabled config was supplied but the relevant transport feature flag was off at build time. More...
 
class  Transport
 
class  TransportError
 Operational/runtime failure inside a transport adapter (connect, subscribe, publish, etc.). More...
 
class  UnknownEventTypeError
 Raised by EventTypeRegistry::schema when the requested name or kind is not registered. More...
 

Typedefs

using EventEnvelopeView = EventEnvelope
 View alias: the envelope is already type-erased over its payload via parcel::cell_t, so the legacy EventEnvelopeView name simply maps onto EventEnvelope itself.
 
using Metadata = md::Metadata
 Envelope metadata: a typed JSON-shaped key/value tree.
 
using InboundSink = std::function< void(const EventEnvelopeView &)>
 Callable installed on a Transport at attach time that receives inbound envelopes the transport pulled off the wire.
 

Enumerations

enum class  TransportScope : std::uint8_t { Local , Remote }
 Distinguishes in-process transports from off-machine ones. More...
 

Functions

template<typename T >
EventBuilder< T > event (T payload)
 
template<typename T , typename... Args>
EventBuilder< T > make_event (Args &&... args)
 
EventTypeRegistryglobal_event_types ()
 Program-wide event type catalog.
 
std::vector< EventTypeInforegistered_event_types ()
 Snapshot of every type registered in the program-wide catalog.
 
parcel::json_t encode_json (const EventEnvelope &env)
 
std::vector< char > encode_cbor (const EventEnvelope &env)
 

Variables

constexpr std::string_view event_kind_prefix = "conduit:event:"
 Wire-kind prefix shared by every conduit event type.
 

Typedef Documentation

◆ EventEnvelopeView

View alias: the envelope is already type-erased over its payload via parcel::cell_t, so the legacy EventEnvelopeView name simply maps onto EventEnvelope itself.

Existing code that holds const EventEnvelopeView& keeps working unchanged.

◆ InboundSink

using conduit::InboundSink = typedef std::function<void(const EventEnvelopeView&)>

Callable installed on a Transport at attach time that receives inbound envelopes the transport pulled off the wire.

The default sink built by Transport::attach(Bus&) forwards directly to Bus::deliver_to_listeners. Wrappers like FilteredTransport install a sink that interposes on the inbound leg before forwarding to the bus.

◆ Metadata

using conduit::Metadata = typedef md::Metadata

Envelope metadata: a typed JSON-shaped key/value tree.

Backed by md::Metadata (= md::Object), so values may be any of null, bool, int64, uint64, float, double, string, Array, or nested Object. See the <md/metadata.hpp> documentation for the full API (require_string, get_string_if, find_path, merge, …).

Enumeration Type Documentation

◆ TransportScope

enum class conduit::TransportScope : std::uint8_t
strong

Distinguishes in-process transports from off-machine ones.

The Bus uses this together with flags::LocalOnly / flags::RemoteOnly to decide whether an envelope is dispatched through a given transport.

Enumerator
Local 
Remote 

Function Documentation

◆ encode_cbor()

std::vector< char > conduit::encode_cbor ( const EventEnvelope env)
inline

◆ encode_json()

parcel::json_t conduit::encode_json ( const EventEnvelope env)
inline

◆ event()

template<typename T >
EventBuilder< T > conduit::event ( payload)
inline

◆ global_event_types()

EventTypeRegistry & conduit::global_event_types ( )
inline

Program-wide event type catalog.

A Meyers singleton, so it is constructed before any inline registrar runs at static-init time.

◆ make_event()

template<typename T , typename... Args>
EventBuilder< T > conduit::make_event ( Args &&...  args)
inline

◆ registered_event_types()

std::vector< EventTypeInfo > conduit::registered_event_types ( )
inline

Snapshot of every type registered in the program-wide catalog.

Variable Documentation

◆ event_kind_prefix

constexpr std::string_view conduit::event_kind_prefix = "conduit:event:"
inlineconstexpr

Wire-kind prefix shared by every conduit event type.

Single source of truth, consumed by Event::kind_id, EventEnvelope::name(), and the event type registry.