automata/event/source
Types
Identification of the producer that emitted an event.
id is the stable identifier of the producer (e.g. plan id, watch
path, webhook endpoint). name is an optional human-readable label.
pub type Source {
Source(
kind: SourceKind,
id: String,
name: option.Option(String),
)
}
Constructors
-
Source(kind: SourceKind, id: String, name: option.Option(String))
Classification of where an event originated.
Closed sum for known transports plus CustomSource(String) as the
escape hatch for ecosystem-external sources (e.g. internal protocols
or experimental integrations).
pub type SourceKind {
ScheduleSource
FileSystemSource
ManualSource
WebhookSource
QueueSource
SignalSource
HttpSource
CloudEventSource
CustomSource(String)
}
Constructors
-
ScheduleSource -
FileSystemSource -
ManualSource -
WebhookSource -
QueueSource -
SignalSource -
HttpSource -
CloudEventSource -
CustomSource(String)
Values
pub fn custom(kind kind: String, id id: String) -> Source
Shortcut for new(CustomSource(kind), id) — the escape hatch for
ecosystem-external producers.
pub fn kind_to_string(kind: SourceKind) -> String
Stable string label for a SourceKind, used for routing tables,
metrics, and structured logs.
pub fn new(kind kind: SourceKind, id id: String) -> Source
Build a Source with no human-readable label. Use with_name to
attach one if your transport/observability needs it.