Commit Graph
10 Commits
Author SHA1 Message Date
Tom Doron 20309e2ad7 code style (#9)
motivation: nicer code

changes
* rename Result to ResultType since swift is getting formal Result soon
* use Handler instead of T for generics in CodableLambda which is more readable
* simpler bytes->String decoding
2018-12-03 18:25:46 -08:00
Tom Doron e3f3a979ee add docs (#8)
motivation: help users better undersatnd how to use the library

changes:
* add API docs to public APIs
* add narattive docs in README
2018-11-30 15:35:37 -08:00
Tom Doron 61a90e123c hide LambdaLifecycleResult from users (#6)
hide LambdaLifecycleResult from users

motivation: cleaner end-user API

changes:
* make LambdaLifecycleResult internal
* change run, _run method signatures to hide LambdaLifecycleResult from end-user API
* adjust tests
2018-11-30 15:11:53 -08:00
Tom Doron 7084c7c881 add public constructor to LambdaContext (#7)
motivation: default ctor is internal, which means we cant use it in external programs

changes: add public ctor
2018-11-27 11:46:02 -08:00
Tom Doron 6d618f2c33 shutdown handler, lambda api adjustment, latest swift-nio (#5)
* shutdown handler, lambda api adjustment, latest swift-nio

motivation:
* shutdown: while not required, demonstrate better example for shutdown
* latest nio and api adjustments: fixes runtime issues observed when running for realz

changes:
* add signal based shutdown hook that terminates and cleans up resources
* pull latest swift-nio to get fix to thread renaming
* adjust aws lambda api prefix and headers
* reformat linux tests code
2018-11-21 12:57:10 -05:00
Norman Maurer a9c8c1cb5f Refactor code to be more robust and more swift-like. (#4)
- Ensure we fail all promises when the Channel is closed or we receive an error to prevent any promise leaks.
- Replace class by enum to ensure people not init it by mistake
- Use struct where class is not needed.
2018-11-15 13:49:32 -08:00
Tom Doron 39b0140b80 http client event loop cleanup (#3)
motivation: EventLoop is also an EventLoopGroup, no need in wrapping

changes: remove SingleEventLoopGroup wrapper, use EventLoop directly
2018-11-15 13:49:32 -08:00
tomer doron 6c9c1616d0 cleanup and refactoring
motivation: cleaner code base

changes:
* define generic Result type, and make LambdaResult a type alias
* rename RunLambdaResult to LambdaRunResult
* remove redundant test and dead code
2018-11-15 13:49:32 -08:00
Johannes Weiss 9e8135ee2b make more Swift-like 2018-11-14 11:53:49 +00:00
tomer doron 93c9cfdf63 initial commit 2018-11-13 17:48:44 -08:00