Forráskód Böngészése

Make path available in async calls (#1462)

Pouya Yarandi 3 éve
szülő
commit
1cde9ee727

+ 5 - 0
Sources/GRPC/AsyncAwaitSupport/GRPCAsyncBidirectionalStreamingCall.swift

@@ -35,6 +35,11 @@ public struct GRPCAsyncBidirectionalStreamingCall<Request: Sendable, Response: S
     return self.call.options
   }
 
+  /// The path used to make the RPC.
+  public var path: String {
+    return self.call.path
+  }
+
   /// Cancel this RPC if it hasn't already completed.
   public func cancel() {
     self.call.cancel(promise: nil)

+ 5 - 0
Sources/GRPC/AsyncAwaitSupport/GRPCAsyncClientStreamingCall.swift

@@ -31,6 +31,11 @@ public struct GRPCAsyncClientStreamingCall<Request: Sendable, Response: Sendable
     return self.call.options
   }
 
+  /// The path used to make the RPC.
+  public var path: String {
+    return self.call.path
+  }
+
   /// Cancel this RPC if it hasn't already completed.
   public func cancel() {
     self.call.cancel(promise: nil)

+ 5 - 0
Sources/GRPC/AsyncAwaitSupport/GRPCAsyncServerStreamingCall.swift

@@ -32,6 +32,11 @@ public struct GRPCAsyncServerStreamingCall<Request: Sendable, Response: Sendable
     return self.call.options
   }
 
+  /// The path used to make the RPC.
+  public var path: String {
+    return self.call.path
+  }
+
   /// Cancel this RPC if it hasn't already completed.
   public func cancel() {
     self.call.cancel(promise: nil)

+ 5 - 0
Sources/GRPC/AsyncAwaitSupport/GRPCAsyncUnaryCall.swift

@@ -31,6 +31,11 @@ public struct GRPCAsyncUnaryCall<Request: Sendable, Response: Sendable>: Sendabl
     self.call.options
   }
 
+  /// The path used to make the RPC.
+  public var path: String {
+    self.call.path
+  }
+
   /// Cancel this RPC if it hasn't already completed.
   public func cancel() {
     self.call.cancel(promise: nil)