Skip to content

Revision #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Aug 19, 2024
Merged

Revision #1

merged 7 commits into from
Aug 19, 2024

Conversation

aryan-25
Copy link
Owner

No description provided.

Copy link

@fabianfett fabianfett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great progress!

The proposed design of passing a `LambdaResponseWriter` as an argument to the `handle` function of objects conforming to
`StreamingLambdaHandler` already allows for background tasks to be run _after_ the response has been returned. This is
because the `handle(...)` function is free to implement any background task that needs to be run after calling the
`LambdaResponseWriter.finish()` function (which sends the computed result to the AWS Lambda response endpoint).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also users are able to spawn async work in structured way. They can start TaskGroups or schedule work using async let (both of which are totally structured).

/// If no response or error is written to the `responseWriter` it will
/// report an error to the invoker.
/// - context: The LambdaContext containing the invocation's metadata
mutating func handle(_ event: ByteBuffer, responseWriter: consuming some LambdaResponseWriter, context: LambdaContext) async
/// - Throws

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// - Throws
/// - Throws:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aryan-25 aryan-25 marked this pull request as ready for review August 19, 2024 12:14
@aryan-25 aryan-25 merged commit bffb114 into v2-api-proposal Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants