pub enum TriggerKind {
Route {
host: Option<String>,
path: String,
methods: Vec<String>,
},
Invoke {
name: String,
},
Queue {
topic: String,
group: String,
start: StartPosition,
},
Cron {
schedule: String,
overlap: Overlap,
},
Blob {
prefix: String,
},
Webhook {
path: String,
secret_env: String,
},
Stream {
topics: Vec<String>,
websocket: bool,
publish_topic: Option<String>,
},
}Expand description
The event that fires a trigger. The role words (route/queue/cron/stream) are the familiar site-view names; each is just a way to reach a function.
Variants§
Route
An HTTP route — the “handler” shape. host scopes it to a virtualhost.
Invoke
A stable invoke name — /api/functions/<name> (the FaaS verb, FA-3).
Queue
A message topic — the “consumer” shape. An empty group is the default
work-queue; a non-empty group is a durable fan-out subscriber (every
message, its own cursor) starting at start on first subscription.
Cron
A cron schedule — the “cron” shape.
Blob
An object-storage change under a prefix (FA-5).
Webhook
A signed inbound webhook (FA-5). secret_env names the host env var
holding the verifying secret (never the secret itself).
Stream
Host-native SSE / WebSocket topic fan-out — the “stream” shape (no component,
so a stream trigger’s target is None).