Browse Source

Make path available in ClientCalls (#1237)

* Make path available in ClientCalls
Ali Moazenzadeh 4 năm trước cách đây
mục cha
commit
8ca4bc0590

+ 5 - 0
Sources/GRPC/ClientCalls/BidirectionalStreamingCall.swift

@@ -37,6 +37,11 @@ public struct BidirectionalStreamingCall<
     return self.call.options
   }
 
+  /// The path used to make the RPC.
+  public var path: String {
+    return self.call.path
+  }
+
   /// The `Channel` used to transport messages for this RPC.
   public var subchannel: EventLoopFuture<Channel> {
     return self.call.channel

+ 5 - 0
Sources/GRPC/ClientCalls/ClientStreamingCall.swift

@@ -35,6 +35,11 @@ public struct ClientStreamingCall<RequestPayload, ResponsePayload>: StreamingReq
     return self.call.options
   }
 
+  /// The path used to make the RPC.
+  public var path: String {
+    return self.call.path
+  }
+
   /// The `Channel` used to transport messages for this RPC.
   public var subchannel: EventLoopFuture<Channel> {
     return self.call.channel

+ 5 - 0
Sources/GRPC/ClientCalls/ServerStreamingCall.swift

@@ -32,6 +32,11 @@ public struct ServerStreamingCall<RequestPayload, ResponsePayload>: ClientCall {
     return self.call.options
   }
 
+  /// The path used to make the RPC.
+  public var path: String {
+    return self.call.path
+  }
+
   /// The `Channel` used to transport messages for this RPC.
   public var subchannel: EventLoopFuture<Channel> {
     return self.call.channel

+ 5 - 0
Sources/GRPC/ClientCalls/UnaryCall.swift

@@ -34,6 +34,11 @@ public struct UnaryCall<RequestPayload, ResponsePayload>: UnaryResponseClientCal
     return self.call.options
   }
 
+  /// The path used to make the RPC.
+  public var path: String {
+    return self.call.path
+  }
+
   /// The `Channel` used to transport messages for this RPC.
   public var subchannel: EventLoopFuture<Channel> {
     return self.call.channel