Skip to main content

Module ports

Module ports 

Source
Expand description

Static port declarations for every node type.

One PortSpec per plugin type, resolved through crate::plugins::port_spec — the single source of truth shared by the graph compiler (edge validation), the admin catalog (GET /api/plugins), and by extension the UI editor. The crate::plugins::Plugin trait has no port method at all: the registry match in port_spec IS the declaration, so a plugin cannot drift from its own ports.

Structs§

PortDecl
One declared output port.
PortSpec
A node type’s full port declaration.

Enums§

PortKind
The flavor of an output port, driving validation and UI color.

Constants§

AUTH_SPEC
Credential-auth plugins: deliberate 401/403 rejections exit on denied. Genuine infrastructure failures (consumer store unavailable, LDAP unreachable, IdP HTTP errors) remain on error.
BREAKER_SPEC
api-breaker: the check phase’s open-circuit short-circuit exits on broken.
CLIENT_SPEC
client: terminal node, the response is sent from here.
CONDITION_SPEC
condition: a pure branching waypoint — no success port, the request always leaves on true or false. Evaluation is lenient (absent variables compare as empty, a JSONPath over a non-JSON body matches nothing), so the node itself never errors; error stays declared for compatibility with policies that wired it.
CORS_SPEC
cors: preflight answers short-circuit on their own port.
DEFAULT_SPEC
The default pair every plugin without alternate outcomes uses.
DENY_SPEC
Restriction and request-shape plugins: a deliberate policy rejection (IP/UA/referer/consumer/group deny, blocked URI, missing/invalid CSRF token, oversized body, schema mismatch) exits on denied. Same shape as AUTH_SPEC but kept as its own const so the description can speak to policy rejections rather than credentials.
ERROR 🔒
FAULT_INJECTION_SPEC
fault-injection: injected abort responses exit on their own port.
INTERACTIVE_AUTH_SPEC
Interactive SSO plugins: denied rejections plus browser redirects.
LIMIT_SPEC
Traffic-control plugins (rate-limit, limit-conn, limit-count): a throttled request exits on limited.
LISTENER_SPEC
listener: pipeline entry, no input, single exit.
PROXY_CACHE_SPEC
proxy-cache (lookup phase): a cache hit exits on hit. success covers a miss or a non-cacheable method/bypass — the request continues to the upstream.
REDIRECT_SPEC
redirect: prepared 3xx responses exit on their own port.
SCRIPT_SPEC
script: a script that prepared ctx.response and asked to answer with it (return ctx, "respond") exits on respond. It is the same shape as abort/denied/redirect: a deliberate short-circuit on a declared port, never inferred from the response the script left behind.
STORE_GET_SPEC
store-get: a key that does not exist is a normal outcome, not an error – it exits miss, which the compiler forces the policy to wire. A store outage exits error instead, so the two stay distinguishable.
SUCCESS 🔒
TRAFFIC_SPLIT_SPEC
traffic-split: a request steered to and served by a weighted split target exits on routed. success covers both “no rule matched” and “the default slot was picked” — the request continues to the route’s normal upstream unchanged.
WORKFLOW_SPEC
workflow: a rejecting return rule exits on denied; an exceeded limit-count rule exits on limited.