Skip to content
This repository has been archived by the owner on Jul 14, 2020. It is now read-only.

Commit

Permalink
Wrong variable and class name in example code.
Browse files Browse the repository at this point in the history
Example code does not compile. "ctx" should be "context", and "Runtime" be "LambdaRuntime"
  • Loading branch information
mr-j-tree authored and fabianfett committed Jan 9, 2020
1 parent 01ba463 commit 28602a7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,16 +123,16 @@ struct Output: Codable {

func squareNumber(input: Input, context: Context) -> EventLoopFuture<Output> {
let squaredNumber = input.number * input.number
return ctx.eventLoop.makeSucceededFuture(Output(result: squaredNumber))
return context.eventLoop.makeSucceededFuture(Output(result: squaredNumber))
}

let group = MultiThreadedEventLoopGroup(numberOfThreads: 1)
defer { try! group.syncShutdownGracefully() }

do {
let runtime = try Runtime.createRuntime(
let runtime = try LambdaRuntime.createRuntime(
eventLoopGroup: group,
handler: Runtime.codable(squareNumber))
handler: LambdaRuntime.codable(squareNumber))

defer { try! runtime.syncShutdown() }

Expand Down

0 comments on commit 28602a7

Please sign in to comment.