swift-aws-lambda-runtime
                                
                                 swift-aws-lambda-runtime copied to clipboard
                                
                                    swift-aws-lambda-runtime copied to clipboard
                            
                            
                            
                        add new abstraction for simple Lambda that does not need explicit initialization
motivation: make simple things simple
changes:
- add new abstraction names SimpleLambdaHandler that has a default initializer
- add test
we could / should consider doing this on LambdaHander instead of the new abstraction, also not in love with the "Simple" prefix.
We can drop context: from LambdaHandler’s initializer, then the SimpleLambdaHandler model will just fit (we can keep async and throws so users can still initialize some resources if they want).
@stevapple context is needed when users need to initialize resources, it provides thinks like NIO's EventLoop and Terminator, so we cannot just drop it.
Is there any reason they cannot use async/await for asynchronous startup, and use throw in place of manual termination? I think that's the "simple" way and should work for most people.
termination is for resource cleanup when shutting down, there needs to be an entry point to that. also all NIO based clients (eg db client based on NIO) need access the the EventLoop for initialization to avoid thread hops
superseded by #273