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

Rename the client interceptor methods #1019

Merged

Conversation

glbrntt
Copy link
Collaborator

@glbrntt glbrntt commented Oct 27, 2020

Motivation:

The gRPC API usually refers to sending and receiving messages. The
interceptor API uses 'write' and 'read' which are a little closer to the
NIO API. We should bias to being more consistent with terms already used
in the API.

Modifications:

  • Rename 'write' to 'send', 'read' to 'receive'
  • Make the 'ClientInterceptor' methods 'open'
  • 'ClientInterceptorContext' methods delegate to a private
    implementation, this was done as the public methods ensured we were on
    the 'EventLoop' first. This is no longer the case so the indirection
    has been removed.

Result:

  • Better naming

Motivation:

The gRPC API usually refers to sending and receiving messages. The
interceptor API uses 'write' and 'read' which are a little closer to the
NIO API. We should bias to being more consistent with terms already used
in the API.

Modifications:

- Rename 'write' to 'send', 'read' to 'receive'
- Make the 'ClientInterceptor' methods 'open'
- 'ClientInterceptorContext' methods delegate to a private
  implementation, this was done as the public methods ensured we were on
  the 'EventLoop' first. This is no longer the case so the indirection
  has been removed.

Result:

- Better naming
@glbrntt glbrntt requested a review from Lukasa October 27, 2020 09:04
@glbrntt glbrntt added the 🔨 semver/patch No public API change. label Oct 27, 2020
Copy link
Collaborator

@Lukasa Lukasa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, this makes sense.

@glbrntt glbrntt merged commit 165e24b into grpc:gb-feature-interceptors Oct 28, 2020
@glbrntt glbrntt deleted the gb-feature-interceptors-rename branch October 28, 2020 08:27
glbrntt added a commit that referenced this pull request Oct 29, 2020
Motivation:

The gRPC API usually refers to sending and receiving messages. The
interceptor API uses 'write' and 'read' which are a little closer to the
NIO API. We should bias to being more consistent with terms already used
in the API.

Modifications:

- Rename 'write' to 'send', 'read' to 'receive'
- Make the 'ClientInterceptor' methods 'open'
- 'ClientInterceptorContext' methods delegate to a private
  implementation, this was done as the public methods ensured we were on
  the 'EventLoop' first. This is no longer the case so the indirection
  has been removed.

Result:

- Better naming
glbrntt added a commit that referenced this pull request Nov 6, 2020
Motivation:

The gRPC API usually refers to sending and receiving messages. The
interceptor API uses 'write' and 'read' which are a little closer to the
NIO API. We should bias to being more consistent with terms already used
in the API.

Modifications:

- Rename 'write' to 'send', 'read' to 'receive'
- Make the 'ClientInterceptor' methods 'open'
- 'ClientInterceptorContext' methods delegate to a private
  implementation, this was done as the public methods ensured we were on
  the 'EventLoop' first. This is no longer the case so the indirection
  has been removed.

Result:

- Better naming
glbrntt added a commit that referenced this pull request Nov 12, 2020
Motivation:

The gRPC API usually refers to sending and receiving messages. The
interceptor API uses 'write' and 'read' which are a little closer to the
NIO API. We should bias to being more consistent with terms already used
in the API.

Modifications:

- Rename 'write' to 'send', 'read' to 'receive'
- Make the 'ClientInterceptor' methods 'open'
- 'ClientInterceptorContext' methods delegate to a private
  implementation, this was done as the public methods ensured we were on
  the 'EventLoop' first. This is no longer the case so the indirection
  has been removed.

Result:

- Better naming
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 semver/patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants