Skip to content

Commit dcea5fb

Browse files
committed
Update ClientInterceptor and ClientContext docs
1 parent 1fb1626 commit dcea5fb

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

Sources/GRPCCore/Call/Client/ClientContext.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ public struct ClientContext: Sendable {
4646
public var localPeer: String
4747

4848
/// Create a new client interceptor context.
49+
///
50+
/// - Parameters:
51+
/// - descriptor: A description of the method being called.
52+
/// - remotePeer: A description of the remote peer.
53+
/// - localPeer: A description of the local peer.
4954
public init(
5055
descriptor: MethodDescriptor,
5156
remotePeer: String,

Sources/GRPCCore/Call/Client/ClientInterceptor.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@
1414
* limitations under the License.
1515
*/
1616

17+
// - FIXME: Update example and documentation to show how to register an interceptor.
18+
1719
/// A type that intercepts requests and response for clients.
1820
///
1921
/// Interceptors allow you to inspect and modify requests and responses. Requests are intercepted
2022
/// before they are handed to a transport and responses are intercepted after they have been
2123
/// received from the transport. They are typically used for cross-cutting concerns like injecting
2224
/// metadata, validating messages, logging additional data, and tracing.
2325
///
24-
/// Interceptors are registered with the server via ``ClientInterceptorPipelineOperation``s.
26+
/// Interceptors are registered with the client via ``ClientInterceptorPipelineOperation``s.
2527
/// You may register them for all services registered with a server, for RPCs directed to specific services, or
2628
/// for RPCs directed to specific methods. If you need to modify the behavior of an interceptor on a
2729
/// per-RPC basis in more detail, then you can use the ``ClientContext/descriptor`` to determine
2830
/// which RPC is being called and conditionalise behavior accordingly.
2931
///
30-
/// - TODO: Update example and documentation to show how to register an interceptor.
31-
///
3232
/// Some examples of simple interceptors follow.
3333
///
3434
/// ## Metadata injection

0 commit comments

Comments
 (0)