ADDR, default :8780) serves a few plain HTTP routes.
They are registered in cmd/server/main.go and implemented in
internal/server.
POST /functions/{function}/invoke
FunctionsService.Invoke over plain HTTP. The request body is the input and
the response body is the output, both in the contract’s encoding, with no
envelope. With Prefer: respond-async it is FunctionsService.InvokeAsync
instead. Only POST is routed. Other methods on this path fall through to the
web UI.
Path and query
Request headers
A browser cannot send these content types cross-site without a CORS
preflight, which the server never grants, so a session cookie alone cannot
invoke from another origin.
The body may be at most 64 MiB. The call waits for its result for up to
INVOKE_DEADLINE (default 5 minutes). Plain HTTP has no way to set a shorter
or longer deadline. Use Invoke with Connect-Timeout-Ms for that.
Disconnecting cancels the wait.
Responses
A
FunctionError body uses the protobuf JSON names:
Response headers
On a sync call that ran (200, 500 or 504):
On 202:
Location
TheLocation on a 202 names /invocations/<id>, which
GET /invocations/{id} below serves.
Error body
Every failure that is not a function’s own error answersapplication/json:
code is the Connect code name. violations appears only when the input
broke the contract, one ContractViolation per failure.
Status codes
The status follows the Connect protocol’s mapping for the code.
The checks run in this order: authentication, the
version query, the
function and version lookup, Alchemy-Retries, Content-Type, then the body.
GET /invocations/{id}
FunctionsService.GetInvocation over plain HTTP. It answers 200 with the
invocation as JSON, the same message GetInvocation returns, while it waits,
runs and after it ends. An unknown id, or one in another tenant, answers 404
with the error body above.
GET /healthz
Answers 204 with no body while the process serves HTTP. It checks no dependency. It is not authenticated.GET /scaling
The demand KEDA’s metrics-api scaler sizes the host Deployment on (host.autoscaling in the Helm chart). Every server gives the same answer,
since the queue depth is read from NATS. It is not authenticated.
If the queue cannot be read, it answers 503 with the error as plain text. See
Autoscaling.
The web UI
Every other path is the web UI. A binary built with-tags embedui serves
ui/build with a fallback to index.html for client routes. Without the tag
it serves a placeholder page that says how to build the UI.