-
Notifications
You must be signed in to change notification settings - Fork 420
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
Add more properties to ClientContext
and have the ClientTransport
provide it
#2158
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The API breaks are expected, since we've added the
|
glbrntt
requested changes
Jan 15, 2025
Sources/GRPCCore/Call/Client/Internal/ClientRPCExecutor+OneShotExecutor.swift
Outdated
Show resolved
Hide resolved
glbrntt
reviewed
Jan 15, 2025
glbrntt
approved these changes
Jan 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fab, thanks Gus!
glbrntt
approved these changes
Jan 15, 2025
glbrntt
approved these changes
Jan 16, 2025
glbrntt
pushed a commit
to grpc/grpc-swift-nio-transport
that referenced
this pull request
Jan 16, 2025
This PR adopts the changes introduced in grpc/grpc-swift#2158, requiring client transports to provide a `ClientContext` alongside the stream.
glbrntt
pushed a commit
that referenced
this pull request
Jan 17, 2025
This PR adds a `localPeer` property to the `ServerContext`, and renames `peer` to `remotePeer`. This is related to #2158 on the client side and will be used to improve the server tracing interceptor.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
ServerTransport
provides theServerContext
, as it contains information that only the transport knows about (such as the remote peer's address).For consistency and to allow the
ClientContext
to also hold some additional information (such as remote and local peer descriptions), this PR changes theClientTransport
protocol so that implementations also provide the correspondingClientContext
.This PR also adds additional information to the context (which will be used by the tracing interceptor but can be useful for users in general): remote and local peer addresses, server hostname, and network transport.