Skip to main content

Module workflow

Module workflow 

Source
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§

LimitCount 🔒
Rule 🔒
WorkflowPlugin
Evaluates ordered rules; the first rule whose case matches applies its action. Rules without a case always 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’s show_limit_quota_header behavior, always on).