Skip to content

Commit e4da2bb

Browse files
authored
Remove deprecated API (#2166)
1 parent a1dbd15 commit e4da2bb

File tree

4 files changed

+3
-36
lines changed

4 files changed

+3
-36
lines changed

Diff for: Sources/GRPCCore/Call/Server/ServerContext.swift

-17
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,6 @@ public struct ServerContext: Sendable {
1919
/// A description of the method being called.
2020
public var descriptor: MethodDescriptor
2121

22-
/// A description of the remote peer.
23-
///
24-
/// The format of the description should follow the pattern "<transport>:<address>" where
25-
/// "<transport>" indicates the underlying network transport (such as "ipv4", "unix", or
26-
/// "in-process"). This is a guideline for how descriptions should be formatted; different
27-
/// implementations may not follow this format so you shouldn't make assumptions based on it.
28-
///
29-
/// Some examples include:
30-
/// - "ipv4:127.0.0.1:31415",
31-
/// - "ipv6:[::1]:443",
32-
/// - "in-process:27182".
33-
@available(*, deprecated, renamed: "remotePeer")
34-
public var peer: String {
35-
get { remotePeer }
36-
set { remotePeer = newValue }
37-
}
38-
3922
/// A description of the remote peer.
4023
///
4124
/// The format of the description should follow the pattern "<transport>:<address>" where

Diff for: Sources/GRPCCore/Documentation.docc/Development/Design.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -173,12 +173,12 @@ concurrency.
173173
Most users won't use ``GRPCClient`` to execute RPCs directly, instead they will
174174
use the generated client stubs which wrap the ``GRPCClient``. Users are
175175
responsible for creating the client and running it (which starts and runs the
176-
underlying transport). This is done by calling ``GRPCClient/run()``. The client
176+
underlying transport). This is done by calling ``GRPCClient/runConnections()``. The client
177177
can be shutdown gracefully by calling ``GRPCClient/beginGracefulShutdown()``
178178
which will stop new RPCs from starting (by failing them with
179179
``RPCError/Code-swift.struct/unavailable``) but allow existing ones to continue.
180180
Existing work can be stopped more abruptly by cancelling the task where
181-
``GRPCClient/run()`` is executing.
181+
``GRPCClient/runConnections()`` is executing.
182182

183183
#### Server
184184

Diff for: Sources/GRPCCore/GRPCClient.swift

+1-6
Original file line numberDiff line numberDiff line change
@@ -227,16 +227,11 @@ public final class GRPCClient<Transport: ClientTransport>: Sendable {
227227
}
228228
}
229229

230-
@available(*, deprecated, renamed: "runConnections", message: "It'll be removed before v2.")
231-
public func run() async throws {
232-
try await self.runConnections()
233-
}
234-
235230
/// Close the client.
236231
///
237232
/// The transport will be closed: this means that it will be given enough time to wait for
238233
/// in-flight RPCs to finish executing, but no new RPCs will be accepted. You can cancel the task
239-
/// executing ``run()`` if you want to abruptly stop in-flight RPCs.
234+
/// executing ``runConnections()`` if you want to abruptly stop in-flight RPCs.
240235
public func beginGracefulShutdown() {
241236
let wasRunning = self.stateMachine.withLock { $0.state.beginGracefulShutdown() }
242237
if wasRunning {

Diff for: Sources/GRPCCore/MethodDescriptor.swift

-11
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,6 @@ public struct MethodDescriptor: Sendable, Hashable {
5151
self.service = ServiceDescriptor(fullyQualifiedService: fullyQualifiedService)
5252
self.method = method
5353
}
54-
55-
@available(*, deprecated, renamed: "init(fullyQualifiedService:method:)")
56-
/// Creates a new method descriptor.
57-
///
58-
/// - Parameters:
59-
/// - service: The fully qualified name of the service, including the package
60-
/// name. For example, "helloworld.Greeter".
61-
/// - method: The name of the method. For example, "SayHello".
62-
public init(service: String, method: String) {
63-
self.init(fullyQualifiedService: service, method: method)
64-
}
6554
}
6655

6756
extension MethodDescriptor: CustomStringConvertible {

0 commit comments

Comments
 (0)