-
Notifications
You must be signed in to change notification settings - Fork 104
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
allow custom initialization of the HandlerType of the LambdaRuntime #310
Conversation
e7ed5fd
to
6aafe79
Compare
@tachyonics wdyt? |
This will work for our use case although not quite as convenient as what I had. My only concern is that |
@tachyonics wdyt about 792d1c1? I dont love the name |
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.
@tomerd I am not really a fan of the name either but otherwise the changes look good and are more consistent.
thanks @tachyonics, so now to the hard part - choosing a name. cc @fabianfett @sebsto @yim-lee @ktoso any good ideas? |
@tomerd |
c0cf6d3
to
f642509
Compare
@tachyonics updated to |
Just some small comments about comments. Otherwise lgtm. |
@tachyonics new name idea: |
Motivation: Provide the flexibility for custom initialisation of the HandlerType as this will often be required by higher level frameworks. Modifications: * Modify the LambdaRuntime type to accept a closure to provide the handler rather than requiring that it is provided by a static method on the Handler type * Update downstream code to use HandlerProvider * Update upstream code to support passing Hanlder Type of Handler Provider * Add and update tests Originally suggested and coded by @tachyonics in swift-server#308
16ce236
to
178ce55
Compare
178ce55
to
a7eb20e
Compare
I'm good with this! |
@fabianfett any concerns? |
Tbh. I think this doesn't solve the actual issue. The lifetime handling in Lambda was designed and implemented before ServiceLifecycle came about. For this reason, using long running clients in Lambda currently feels absolutely weird. For this reason, I think, we should reconsider what the Lambda API should look like taking into account that it should play nicely with ServiceLifecycle. General ideas:
|
Motivation: Provide the flexibility for custom initialization of the HandlerType as this will often be required by higher level frameworks.
Modifications:
Originally suggested and coded by @tachyonics in #308