Skip to content

Commit d4d7bed

Browse files
authored
Add target ConnectionPoolModule (vapor#412)
Add `ConnectionPoolModule` We want to land a new ConnectionPool into PostgresNIO in the comming weeks. Since this pool is abstract, let's create a target and product for it. The target and product are both underscored, to signal that we don't make any API stability guarantees.
1 parent 1a76cdc commit d4d7bed

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

Diff for: Package.swift

+21
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ let package = Package(
1111
],
1212
products: [
1313
.library(name: "PostgresNIO", targets: ["PostgresNIO"]),
14+
.library(name: "_ConnectionPoolModule", targets: ["_ConnectionPoolModule"]),
1415
],
1516
dependencies: [
1617
.package(url: "https://github.com/apple/swift-atomics.git", from: "1.2.0"),
18+
.package(url: "https://github.com/apple/swift-collections.git", from: "1.0.4"),
1719
.package(url: "https://github.com/apple/swift-nio.git", from: "2.59.0"),
1820
.package(url: "https://github.com/apple/swift-nio-transport-services.git", from: "1.19.0"),
1921
.package(url: "https://github.com/apple/swift-nio-ssl.git", from: "2.25.0"),
@@ -25,6 +27,7 @@ let package = Package(
2527
.target(
2628
name: "PostgresNIO",
2729
dependencies: [
30+
.target(name: "_ConnectionPoolModule"),
2831
.product(name: "Atomics", package: "swift-atomics"),
2932
.product(name: "Crypto", package: "swift-crypto"),
3033
.product(name: "Logging", package: "swift-log"),
@@ -38,6 +41,14 @@ let package = Package(
3841
.product(name: "NIOFoundationCompat", package: "swift-nio"),
3942
]
4043
),
44+
.target(
45+
name: "_ConnectionPoolModule",
46+
dependencies: [
47+
.product(name: "Atomics", package: "swift-atomics"),
48+
.product(name: "DequeModule", package: "swift-collections"),
49+
],
50+
path: "Sources/ConnectionPoolModule"
51+
),
4152
.testTarget(
4253
name: "PostgresNIOTests",
4354
dependencies: [
@@ -46,6 +57,16 @@ let package = Package(
4657
.product(name: "NIOTestUtils", package: "swift-nio"),
4758
]
4859
),
60+
.testTarget(
61+
name: "ConnectionPoolModuleTests",
62+
dependencies: [
63+
.target(name: "_ConnectionPoolModule"),
64+
.product(name: "DequeModule", package: "swift-collections"),
65+
.product(name: "NIOCore", package: "swift-nio"),
66+
.product(name: "NIOConcurrencyHelpers", package: "swift-nio"),
67+
.product(name: "NIOEmbedded", package: "swift-nio"),
68+
]
69+
),
4970
.testTarget(
5071
name: "IntegrationTests",
5172
dependencies: [

Diff for: Sources/ConnectionPoolModule/gitkeep.swift

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

Diff for: Tests/ConnectionPoolModuleTests/gitkeep.swift

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

0 commit comments

Comments
 (0)