-
Notifications
You must be signed in to change notification settings - Fork 118
Split LambdaRuntimeClient in two files for easier reading #554
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Splits the LambdaRuntimeClient.swift
file into two separate files to improve code organization and maintainability. The LambdaChannelHandler
and related protocol definitions are moved to a dedicated file.
- Extracts
LambdaChannelHandler
and related types to a separate file - Consolidates empty method implementation in
LambdaRuntimeClient
- Maintains all existing functionality while improving code readability
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
File | Description |
---|---|
Sources/AWSLambdaRuntime/LambdaRuntimeClient.swift | Removes extracted code and simplifies empty delegate method |
Sources/AWSLambdaRuntime/LambdaRuntimeClient+ChannelHandler.swift | Contains moved LambdaChannelHandler class and protocol definition |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
"user-agent": .userAgent, | ||
"Lambda-Runtime-Function-Response-Mode": "streaming", | ||
// these are not used by this runtime client at the moment | ||
// FIXME: the eror handling should inject these headers in the streamed response to report mid-stream errors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in comment: 'eror' should be 'error'
// FIXME: the eror handling should inject these headers in the streamed response to report mid-stream errors | |
// FIXME: the error handling should inject these headers in the streamed response to report mid-stream errors |
Copilot uses AI. Check for mistakes.
import NIOHTTP1 | ||
import NIOPosix | ||
|
||
protocol LambdaChannelHandlerDelegate { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The protocol is no longer private after being moved to a separate file. Consider making it internal
or add private
to maintain the same access level as before.
protocol LambdaChannelHandlerDelegate { | |
private protocol LambdaChannelHandlerDelegate { |
Copilot uses AI. Check for mistakes.
func connectionErrorHappened(_ error: any Error, channel: any Channel) | ||
} | ||
|
||
final class LambdaChannelHandler<Delegate: LambdaChannelHandlerDelegate> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The class is no longer private after being moved to a separate file. Consider making it internal
or add private
to maintain the same access level as before.
final class LambdaChannelHandler<Delegate: LambdaChannelHandlerDelegate> { | |
private final class LambdaChannelHandler<Delegate: LambdaChannelHandlerDelegate> { |
Copilot uses AI. Check for mistakes.
Split the long
LambdaRuntimeClient.swift
file in two parts: theLambdaRuntimeClient
and theLambdaChannelHandler
for easier reading and maintenance