Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make path available in async calls #1462

Merged
merged 1 commit into from
Jul 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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