Skip to main content

Module faas

Module faas 

Source
Expand description

Shared helpers for the serverless / function-as-a-service upstream plugins (azure-functions, openfunction, openwhisk).

These plugins all invoke an external FaaS endpoint and return its reply as the gateway response. The helpers here centralize the request-forwarding shape (method, headers, query, target URL) and the outbound-error → status mapping so each plugin only adds its own auth header and response handling.

Functions§

classify_error
Maps an OutboundError to a client-facing (status, message) pair used by the FaaS plugins’ error ports.
forward_parts
Builds the forwarded request parts for a FaaS callout: the header list (client headers minus hop-by-hop, with Host overridden to the endpoint), the fully-qualified target URL (function_uri path plus the client’s query string), and the client’s HTTP method.
query_string 🔒
Encodes the request query parameters as a &-joined name=value string, sorted for stable output. Names and values are percent-encoded.
uri_encode 🔒
Percent-encodes per RFC 3986, keeping the unreserved set intact.

Type Aliases§

ForwardParts
The forwarded request parts for a FaaS callout: header list, target URL, and HTTP method.