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

Codegen for client interceptors #1022

Merged

Conversation

glbrntt
Copy link
Collaborator

@glbrntt glbrntt commented Oct 28, 2020

Motivation:

We have client interceptors wired all the way through but no convnenient
way for them to be used.

Modifications:

  • Generate an client interceptor factory which has a
    make<Method>Interceptors() function for each method on the service
  • The interceptor factory is an optional requirement on the generated
    client protocol, RPC invocations will pull interceptors from the
    factory, if present.

Result:

Users can provide interceptor factory implementations to their generated
clients to use interceptors.

@glbrntt
Copy link
Collaborator Author

glbrntt commented Oct 28, 2020

The changes are in ea1e537, the other commit is just regenerated code.

@glbrntt glbrntt added the 🔨 semver/patch No public API change. label Oct 28, 2020
@glbrntt glbrntt requested a review from Lukasa October 28, 2020 09:31
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.

Nice! Smooth change, I like it.

Motivation:

We have client interceptors wired all the way through but no convnenient
way for them to be used.

Modifications:

- Generate an client interceptor factory which has a
  `make<Method>Interceptors()` function for each method on the service
- The interceptor factory is an optional requirement on the generated
  client protocol, RPC invocations will pull interceptors from the
  factory, if present.

Result:

Users can provide interceptor factory implementations to their generated
clients to use interceptors.
@glbrntt glbrntt force-pushed the gb-feature-interceptors-07 branch from 36e06fe to 5effb87 Compare October 29, 2020 08:44
@glbrntt glbrntt merged commit a1a2651 into grpc:gb-feature-interceptors Oct 29, 2020
@glbrntt glbrntt deleted the gb-feature-interceptors-07 branch October 29, 2020 08:52
glbrntt added a commit that referenced this pull request Oct 29, 2020
Motivation:

We have client interceptors wired all the way through but no convnenient
way for them to be used.

Modifications:

- Generate an client interceptor factory which has a
  `make<Method>Interceptors()` function for each method on the service
- The interceptor factory is an optional requirement on the generated
  client protocol, RPC invocations will pull interceptors from the
  factory, if present.

Result:

Users can provide interceptor factory implementations to their generated
clients to use interceptors.
glbrntt added a commit that referenced this pull request Nov 6, 2020
Motivation:

We have client interceptors wired all the way through but no convnenient
way for them to be used.

Modifications:

- Generate an client interceptor factory which has a
  `make<Method>Interceptors()` function for each method on the service
- The interceptor factory is an optional requirement on the generated
  client protocol, RPC invocations will pull interceptors from the
  factory, if present.

Result:

Users can provide interceptor factory implementations to their generated
clients to use interceptors.
glbrntt added a commit that referenced this pull request Nov 12, 2020
Motivation:

We have client interceptors wired all the way through but no convnenient
way for them to be used.

Modifications:

- Generate an client interceptor factory which has a
  `make<Method>Interceptors()` function for each method on the service
- The interceptor factory is an optional requirement on the generated
  client protocol, RPC invocations will pull interceptors from the
  factory, if present.

Result:

Users can provide interceptor factory implementations to their generated
clients to use interceptors.
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