Skip to content

Revision#1

Merged
aryan-25 merged 7 commits into
v2-api-proposalfrom
proposal-revision
Aug 19, 2024
Merged

Revision#1
aryan-25 merged 7 commits into
v2-api-proposalfrom
proposal-revision

Conversation

@aryan-25
Copy link
Copy Markdown
Owner

No description provided.

Copy link
Copy Markdown

@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!

Comment thread Sources/AWSLambdaRuntimeCore/Documentation.docc/Proposals/0001-v2-api.md Outdated
Comment thread Sources/AWSLambdaRuntimeCore/Documentation.docc/Proposals/0001-v2-api.md Outdated
Comment thread Sources/AWSLambdaRuntimeCore/Documentation.docc/Proposals/0001-v2-api.md Outdated
Comment thread Sources/AWSLambdaRuntimeCore/Documentation.docc/Proposals/0001-v2-api.md Outdated
Comment thread Sources/AWSLambdaRuntimeCore/Documentation.docc/Proposals/0001-v2-api.md Outdated
Comment thread Sources/AWSLambdaRuntimeCore/Documentation.docc/Proposals/0001-v2-api.md Outdated
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).
Copy link
Copy Markdown

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).

Comment thread Sources/AWSLambdaRuntimeCore/Documentation.docc/Proposals/0001-v2-api.md Outdated
Comment thread Sources/AWSLambdaRuntimeCore/Documentation.docc/Proposals/0001-v2-api.md Outdated
Comment thread Sources/AWSLambdaRuntimeCore/Documentation.docc/Proposals/0001-v2-api.md Outdated
Comment thread Sources/AWSLambdaRuntimeCore/Documentation.docc/Proposals/0001-v2-api.md Outdated
Comment thread Sources/AWSLambdaRuntimeCore/Documentation.docc/Proposals/0001-v2-api.md Outdated
/// 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
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown

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