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 or an
exceeded limit-count has the rejection already written onto
Context.response and exits through the node’s error port (codes
WORKFLOW_REJECTED / RATE_LIMITED). Wire error to a pass-through path
(straight to client.in, or an error-handler that preserves the
prepared response). 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).