Skip to content

Commit

Permalink
Make path available in async calls (grpc#1462)
Browse files Browse the repository at this point in the history
  • Loading branch information
pouyayarandi authored Jul 26, 2022
1 parent 4c63368 commit 1cde9ee
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 5 additions & 0 deletions Sources/GRPC/AsyncAwaitSupport/GRPCAsyncUnaryCall.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1cde9ee

Please sign in to comment.