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

Wrong variable and class name in example code. #12

Merged
merged 1 commit into from
Jan 9, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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