Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
stevapple committed Sep 24, 2021
1 parent a60f159 commit 1c7788b
Show file tree
Hide file tree
Showing 29 changed files with 170 additions and 180 deletions.
1 change: 0 additions & 1 deletion .swiftformat
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,5 @@
--disable andOperator
--disable wrapMultilineStatementBraces
--disable enumNamespaces
--disable redundantExtensionACL

# rules
13 changes: 10 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ let package = Package(
.library(name: "TencentSCFTesting", targets: ["TencentSCFTesting"]),
],
dependencies: [
.package(url: "https://github.com/apple/swift-nio.git", from: "2.17.0"),
.package(url: "https://github.com/apple/swift-nio.git", from: "2.32.0"),
.package(url: "https://github.com/apple/swift-log.git", from: "1.0.0"),
.package(url: "https://github.com/swift-server/swift-backtrace.git", from: "1.1.0"),
.package(url: "https://github.com/stevapple/tencent-cloud-core.git", .upToNextMinor(from: "0.2.0")),
Expand All @@ -27,7 +27,7 @@ let package = Package(
targets: [
.target(name: "TencentSCFRuntime", dependencies: [
.byName(name: "TencentSCFRuntimeCore"),
.product(name: "NIO", package: "swift-nio"),
.product(name: "NIOCore", package: "swift-nio"),
.product(name: "NIOFoundationCompat", package: "swift-nio"),
]),
.testTarget(name: "TencentSCFRuntimeTests", dependencies: [
Expand All @@ -39,6 +39,9 @@ let package = Package(
.product(name: "Logging", package: "swift-log"),
.product(name: "Backtrace", package: "swift-backtrace"),
.product(name: "NIOHTTP1", package: "swift-nio"),
.product(name: "NIOCore", package: "swift-nio"),
.product(name: "NIOConcurrencyHelpers", package: "swift-nio"),
.product(name: "NIOPosix", package: "swift-nio"),
]),
.testTarget(name: "TencentSCFRuntimeCoreTests", dependencies: [
.byName(name: "TencentSCFRuntimeCore"),
Expand All @@ -58,8 +61,12 @@ let package = Package(
// for perf testing
.target(name: "MockServer", dependencies: [
.product(name: "NIOHTTP1", package: "swift-nio"),
.product(name: "NIO", package: "swift-nio"),
]),
.target(name: "StringSample", dependencies: ["TencentSCFRuntime"]),
.target(name: "CodableSample", dependencies: ["TencentSCFRuntime"]),
.target(name: "CodableSample", dependencies: [
.byName(name: "TencentSCFRuntime"),
.product(name: "NIO", package: "swift-nio"),
]),
]
)
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,9 @@ Performance sensitive cloud functions may choose to use a more complex API which

```swift
// Import the modules.
import NIOCore
import TencentSCFRuntime
import TencentSCFEvents
import NIO

// Our SCF handler, conforms to EventLoopSCFHandler.
struct Handler: EventLoopSCFHandler {
typealias In = COS.Event // Request type
Expand Down
2 changes: 1 addition & 1 deletion Sources/CodableSample/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
//
//===------------------------------------------------------------------------------------===//

import NIO
import NIOCore
import TencentSCFRuntime

struct Request: Decodable {
Expand Down
3 changes: 2 additions & 1 deletion Sources/MockServer/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@
//===------------------------------------------------------------------------------------===//

import Foundation
import NIO
import NIOCore
import NIOHTTP1
import NIOPosix

internal struct MockServer {
private let group: EventLoopGroup
Expand Down
2 changes: 1 addition & 1 deletion Sources/StringSample/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
//
//===------------------------------------------------------------------------------------===//

import NIO
import NIOCore
import TencentSCFRuntimeCore

// In this example we are receiving and responding with strings.
Expand Down
2 changes: 1 addition & 1 deletion Sources/TencentSCFRuntime/SCF+Codable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

import class Foundation.JSONDecoder
import class Foundation.JSONEncoder
import NIO
import NIOCore
import NIOFoundationCompat
@_exported import TencentSCFRuntimeCore

Expand Down
Loading

0 comments on commit 1c7788b

Please sign in to comment.