9 Commits
Author SHA1 Message Date
tomer doronandGitHub e5b44962bd Prefix data structures with Lambda instead of namespacing them (#256)
motivation: consisten naming convention

changes:
* Lambda.InitializationContext -> LambdaInitializationContext
* Lambda.Runner -> LambdaRunner
* Lambda.Configuration -> LambdaConfiguration
* Lambda.RuntimeError -> LambdaRuntimeError
* adjust call sites, tests, and examples
2022-04-15 13:33:54 +02:00
Fabian FettandGitHub d06d22c0e0 Lambda factory as a protocol requirement. (#244) 2022-01-13 19:10:20 +01:00
Fabian FettandGitHub b8d89ca208 Add ControlPlaneRequest, ControlPlaneResponse (#238)
### Motivation:

In the coming weeks, we want to restructure the LambdaRuntime internals in such a way, that we allocate a lot less resources per invocation. To accomplish this, we want to encode and decode the ControlPlaneAPI requests directly from their semantic value. For this reason, we need a specialized ControlPlaneRequest and ControlPlaneResponse type that we can encode from and decode into.

### Modifications:

- Add `ControlPlaneRequest`, `ControlPlaneResponse`
- Move `Invocation` and `ErrorResponse` into same file as `ControlPlaneRequest`
- Remove `Lambda` namespace around `Invocation`
2021-12-06 21:17:38 +01:00
Fabian FettandGitHub f01a9b607b Use explicit NIO imports (#220)
- Use explicit NIO modules `NIOCore`, `NIOPosix` and `NIOEmbedded` introduced with SwiftNIO 2.32.0
2021-08-19 09:42:23 +02:00
pokryfkaandGitHub 1b594cad62 Generate trace ID in correct format (#139)
motivation: more correct Xray TraceID

changes:
* add AmazonHeaders::generateXRayTraceID
* Generate correct trace ID in LocalLambda Server
* Generate correct trace ID in LambdaRuntimeClientTest
2020-07-07 18:53:25 -07:00
Ro-MandGitHub 77280662e3 Added header when reporting failing invocations or initializations #116 (#128)
* allow the users of client to provide headers
* add initialization error header
* add error header to failed invocations
* fix external setting of ip and port via config
* add tests
2020-06-17 06:55:05 -07:00
tomer doronandGitHub d1a927650a add initialization context (#126)
motivation: in more complex initialization scearios you may want access to a logger or other utilities

changes:
* introduce new InitializationContext type that could be extended in the future without breaking the API in semantic-major way
* instead of passing in EventLoop to the handler factory, pass in a context that includes a Logger, an EventLoop and a ByteBufferAllocator
* fix a bug where we dont hop back to the event loop when coming back from the handler
* adjust tests to the new signature
2020-06-16 11:08:00 -07:00
Fabian FettandGitHub 0008e59bab Rename payload to event (#115) 2020-06-07 07:47:05 -07:00
Fabian FettandGitHub 1d9637279a Moved Foundation to AWSLambdaRuntime; AWSLambdaRuntime renamed to AWSLambdaRuntimeCore (#41)
motivation: enable non-foundation module for performance sensitive use cases

changes: 
* rename AWSLambdaRuntime to AWSLambdaRuntimeCore 
* create AWSLambdaRuntime for Foundation dependent functionality 
* have (new) AWSLambdaRuntime export AWSLambdaRuntimeCore
* adjust tests
2020-05-07 09:37:28 -07:00