Skip to content

Commit da5a236

Browse files
authored
Create new HTTP2 transport modules (#1757)
1 parent f7641a0 commit da5a236

File tree

7 files changed

+108
-1
lines changed

7 files changed

+108
-1
lines changed

Package.swift

Lines changed: 54 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,9 @@ extension Target.Dependency {
134134

135135
static let grpcCore: Self = .target(name: "GRPCCore")
136136
static let grpcInProcessTransport: Self = .target(name: "GRPCInProcessTransport")
137+
static let grpcHTTP2Core: Self = .target(name: "GRPCHTTP2Core")
138+
static let grpcHTTP2TransportNIOPosix: Self = .target(name: "GRPCHTTP2TransportNIOPosix")
139+
static let grpcHTTP2TransportNIOTransportServices: Self = .target(name: "GRPCHTTP2TransportNIOTransportServices")
137140
}
138141

139142
// MARK: - Targets
@@ -177,6 +180,29 @@ extension Target {
177180
.grpcCore
178181
]
179182
)
183+
184+
static let grpcHTTP2Core: Target = .target(
185+
name: "GRPCHTTP2Core",
186+
dependencies: [
187+
.grpcCore,
188+
.nioCore,
189+
.nioHTTP2
190+
]
191+
)
192+
193+
static let grpcHTTP2TransportNIOPosix: Target = .target(
194+
name: "GRPCHTTP2TransportNIOPosix",
195+
dependencies: [
196+
.grpcHTTP2Core
197+
]
198+
)
199+
200+
static let grpcHTTP2TransportNIOTransportServices: Target = .target(
201+
name: "GRPCHTTP2TransportNIOTransportServices",
202+
dependencies: [
203+
.grpcHTTP2Core
204+
]
205+
)
180206

181207
static let cgrpcZlib: Target = .target(
182208
name: cgrpcZlibTargetName,
@@ -251,6 +277,27 @@ extension Target {
251277
.grpcInProcessTransport,
252278
]
253279
)
280+
281+
static let grpcHTTP2CoreTests: Target = .testTarget(
282+
name: "GRPCHTTP2CoreTests",
283+
dependencies: [
284+
.grpcHTTP2Core
285+
]
286+
)
287+
288+
static let grpcHTTP2TransportNIOPosixTests: Target = .testTarget(
289+
name: "GRPCHTTP2TransportNIOPosixTests",
290+
dependencies: [
291+
.grpcHTTP2TransportNIOPosix
292+
]
293+
)
294+
295+
static let grpcHTTP2TransportNIOTransportServicesTests: Target = .testTarget(
296+
name: "GRPCHTTP2TransportNIOTransportServicesTests",
297+
dependencies: [
298+
.grpcHTTP2TransportNIOTransportServices
299+
]
300+
)
254301

255302
static let grpcCodeGenTests: Target = .testTarget(
256303
name: "GRPCCodeGenTests",
@@ -591,11 +638,17 @@ let package = Package(
591638
.grpcCore,
592639
.grpcInProcessTransport,
593640
.grpcCodeGen,
641+
.grpcHTTP2Core,
642+
.grpcHTTP2TransportNIOPosix,
643+
.grpcHTTP2TransportNIOTransportServices,
594644

595645
// v2 tests
596646
.grpcCoreTests,
597647
.grpcInProcessTransportTests,
598-
.grpcCodeGenTests
648+
.grpcCodeGenTests,
649+
.grpcHTTP2CoreTests,
650+
.grpcHTTP2TransportNIOPosixTests,
651+
.grpcHTTP2TransportNIOTransportServicesTests
599652
]
600653
)
601654

Sources/GRPCHTTP2Core/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# gRPC HTTP2 Core
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# gRPC HTTP2 Transport NIO POSIX
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# gRPC HTTP2 Transport NIO Transport Services
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/*
2+
* Copyright 2024, gRPC Authors All rights reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
// Add tests to this package.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/*
2+
* Copyright 2024, gRPC Authors All rights reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
// Add tests to this package.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/*
2+
* Copyright 2024, gRPC Authors All rights reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
// Add tests to this package.

0 commit comments

Comments
 (0)