Canonical payload contract for PubSub broadcast events.
Payload shape (asm.pubsub.event.v1):
%{
schema: "asm.pubsub.event.v1",
event: %ASM.Event{},
meta: %{
event_id: String.t(),
event_kind: atom(),
session_id: String.t(),
run_id: String.t(),
provider: atom() | nil,
published_at: DateTime.t(),
source: atom(),
topics: [String.t()]
}
}
Summary
Types
@type meta() :: %{ :event_id => String.t(), :event_kind => ASM.Event.kind(), :session_id => String.t(), :run_id => String.t(), :provider => atom() | nil, :published_at => DateTime.t(), :source => atom(), optional(:topics) => [String.t()] }
@type t() :: %{schema: String.t(), event: ASM.Event.t(), meta: meta()}
Functions
@spec build( ASM.Event.t(), keyword() ) :: t()
@spec schema() :: String.t()