Std.Http.Server.Lambda.LambdaError
type
LambdaErrorThis declaration introduces a public type.
What it does
Serving a platform that invokes a program instead of connecting to it.
A serverless platform does not open a socket to a service. It starts a
process, hands it one request at a time, and freezes it in between — so a
program written as a listener has nothing to listen to, and the usual answer
is a wrapper in whatever language the platform runs natively. That wrapper
then holds a second copy of whatever it had to do to answer, which is a
second copy that can disagree with the first.
This is the other answer: the program asks the platform for work rather than
waiting to be connected to. What it serves is an ordinary handler — the same
one a listener serves — so nothing about a service has to be written twice.
The loop is the one AWS Lambda defines and every platform built on it
speaks. It is written here rather than in the compiler because it is a use of
the library rather than a property of the language: a request is fetched, a
handler answers it, the answer is posted back, and none of that needs the
evaluator's help.
Why a run of the loop ended.
A loop that ends is worth telling apart from one that was stopped. The
platform is entitled to freeze a process between requests and to end it
whenever it likes, so ending is ordinary — but ending because the address of
the runtime was never set is a program started outside a platform, and that
is a mistake in how it was deployed rather than a shutdown.
Read the signature
- This declaration has no value signature because it introduces a type or trait.
