Files
swift-aws-lambda-runtime/Sources/SwiftAwsLambdaStringSample/main.swift
T
Tom DoronandGitHub Enterprise c3d4ad5a39 performance tests (#16)
motivation: benchmark for comparison of warm/cold runs

changes:
* refactor configuration
* add mock server that can be used by perf tests
* add simple perf test script
* change redundant classes to structs, make remaining classes final
* make offloading opt-in
* safer locking
* fix format
2020-03-04 11:01:15 -08:00

22 lines
768 B
Swift

//===----------------------------------------------------------------------===//
//
// This source file is part of the SwiftAwsLambda open source project
//
// Copyright (c) 2017-2018 Apple Inc. and the SwiftAwsLambda project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of SwiftAwsLambda project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//
import SwiftAwsLambda
// in this example we are receiving and responding with strings
Lambda.run { (_, payload: String, callback) in
// as an example, respond with the reverse the input payload
callback(.success(String(payload.reversed())))
}