Expand description
Workflow plugin (workflow) — a faithful subset of Apache APISIX’s
workflow plugin: declarative traffic rules evaluated in order, where the
first matching case triggers its action.
Supported actions (of APISIX’s registrable set): return (reject with a
status code) and limit-count (fixed-window rate limiting via the shared
counter store).
Early-exit wiring: a request rejected by a return action has the
rejection already written onto Context.response and exits through the
node’s denied port; an exceeded limit-count action exits through
limited. Wire both to a pass-through path (straight to client.in,
or an error-handler that preserves the prepared response). A
counter-backend failure while evaluating limit-count is a genuine
infrastructure failure and stays on error. Requests that match no
rule — or that pass the limit-count check — continue through the
success port.
Structs§
- Limit
Count 🔒 - Rule 🔒
- Workflow
Plugin - Evaluates ordered rules; the first rule whose
casematches applies its action. Rules without acasealways match. No matching rule means passthrough.
Enums§
- Action 🔒
Statics§
- INSTANCE_
SEQ 🔒 - Distinguishes counter namespaces between workflow node instances so two
nodes with identical rules don’t share windows (APISIX isolates with a
per-conf
_vid).
Functions§
- set_
quota_ 🔒headers - Sets the standard
X-RateLimit-*response headers (APISIX’sshow_limit_quota_headerbehavior, always on).