Skip to content

0.3.0

Latest
Compare
Choose a tag to compare
@Nirlah Nirlah released this 11 Dec 04:38

Lambda URLs

Added event decoders & encoders for both buffered and streaming Lambda URLs.
Check out the demos to learn how to use lambda.url.

Response Streaming

[BREAKING] Formatting convention

Replaced stream.writeFmt(···) and stream.publishFmt(···) with a conventional stream.writer().

[BREAKING] Removed stream.closeWithError

It seems that while the HTTP payloads are sent correctly to the Runtime API – the behavior is ignored.
I'm removing it until further investigation so I could implement it with confidence.

In the meanwhile, the same can be achieved by combining lambda.log(···), stream.publish(···), stream.close(), and the new ctx.forceTerminateAfterResponse().

Open With Payload

Allows opening the stream and sending an initial body payload to the Runtime API in a single call.
This is mostly for supporting Lambda’s HTTP Integration protocol.

const raw_http = "6\r\nHello!\r\n";
try stream.openWith("text/plain", raw_http);

Warning

Note that the payload is raw, as it merely appends the bytes to the HTTP request – it’s up to the user to format it with proper semantics (or use one of the new Event Encoders).

Misc

  • Support for scheduling termination of the function instance until after the handler provides a response to the client:
    ctx.forceTerminateAfterResponse();
  • Add GPA allocator leak detection in debug mode.