File tree 2 files changed +3
-4
lines changed
Sources/AWSLambdaRuntimeCore
2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -20,15 +20,14 @@ import NIO
20
20
21
21
extension Lambda {
22
22
/// Lambda runtime initialization context.
23
- /// The Lambda runtime generates and passes the `InitializationContext` to the Lambda handler as an argument.
23
+ /// The Lambda runtime generates and passes the `InitializationContext` to the Lambda factory as an argument.
24
24
public final class InitializationContext {
25
25
/// `Logger` to log with
26
26
///
27
27
/// - note: The `LogLevel` can be configured using the `LOG_LEVEL` environment variable.
28
28
public let logger : Logger
29
29
30
30
/// The `EventLoop` the Lambda is executed on. Use this to schedule work with.
31
- /// This is useful when implementing the `EventLoopLambdaHandler` protocol.
32
31
///
33
32
/// - note: The `EventLoop` is shared with the Lambda runtime engine and should be handled with extra care.
34
33
/// Most importantly the `EventLoop` must never be blocked.
Original file line number Diff line number Diff line change @@ -39,8 +39,8 @@ extension Lambda {
39
39
let context = InitializationContext ( logger: logger, eventLoop: self . eventLoop)
40
40
return factory ( context)
41
41
// Hopping back to "our" EventLoop is importnant in case the factory returns a future
42
- // that originiated from a foreign EventLoop/EventLoopGroup.
43
- // This can happen if the factory uses a library (lets say a DB client) that manages its own threads/loops
42
+ // that originated from a foreign EventLoop/EventLoopGroup.
43
+ // This can happen if the factory uses a library (let's say a database client) that manages its own threads/loops
44
44
// for whatever reason and returns a future that originated from that foreign EventLoop.
45
45
. hop ( to: self . eventLoop)
46
46
. peekError { error in
You can’t perform that action at this time.
0 commit comments