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

Add head and tail interceptors. #993

Merged

Conversation

glbrntt
Copy link
Collaborator

@glbrntt glbrntt commented Oct 14, 2020

Motivation:

An interceptor pipeline needs interceptors, and users need to be able to
create their own interceptors.

Modifications:

  • Rename 'ClientInterceptor' to 'ClientInterceptorProtocol'
  • Add a 'ClientInterceptor' base class for users to extend
  • Add head and tail interceptors
  • Add 'AnyClientInterceptor' which wraps the above.
  • Build out a little more of the pipeline; note that this is by no means
    complete yet but it gets us to a stage where we can fire events
    through it.
  • Move next inbound/outbound context fetching from context to pipeline
    because the context doesn't need to know the ordering of interceptors.
  • Add a couple of simple pipeline tests.

Result:

We have a basic interceptor pipeline and a way for users to define
interceptors.

Motivation:

An interceptor pipeline needs interceptors, and users need to be able to
create their own interceptors.

Modifications:

- Rename 'ClientInterceptor' to 'ClientInterceptorProtocol'
- Add a 'ClientInterceptor' base class for users to extend
- Add head and tail interceptors
- Add 'AnyClientInterceptor' which wraps the above.
- Build out a little more of the pipeline; note that this is by no means
  complete yet but it gets us to a stage where we can fire events
  through it.
- Move next inbound/outbound context fetching from context to pipeline
  because the context doesn't need to know the ordering of interceptors.
- Add a couple of simple pipeline tests.

Result:

We have a basic interceptor pipeline and a way for users to define
interceptors.
@glbrntt glbrntt added the 🆕 semver/minor Adds new public API. label Oct 14, 2020
@glbrntt glbrntt requested a review from Lukasa October 14, 2020 14:38
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 patch, LGTM.

@glbrntt glbrntt merged commit 09c6ea2 into grpc:gb-feature-interceptors Oct 15, 2020
@glbrntt glbrntt deleted the gb-feature-interceptors-02 branch October 15, 2020 13:02
glbrntt added a commit that referenced this pull request Oct 29, 2020
Motivation:

An interceptor pipeline needs interceptors, and users need to be able to
create their own interceptors.

Modifications:

- Rename 'ClientInterceptor' to 'ClientInterceptorProtocol'
- Add a 'ClientInterceptor' base class for users to extend
- Add head and tail interceptors
- Add 'AnyClientInterceptor' which wraps the above.
- Build out a little more of the pipeline; note that this is by no means
  complete yet but it gets us to a stage where we can fire events
  through it.
- Move next inbound/outbound context fetching from context to pipeline
  because the context doesn't need to know the ordering of interceptors.
- Add a couple of simple pipeline tests.

Result:

We have a basic interceptor pipeline and a way for users to define
interceptors.
glbrntt added a commit that referenced this pull request Nov 6, 2020
Motivation:

An interceptor pipeline needs interceptors, and users need to be able to
create their own interceptors.

Modifications:

- Rename 'ClientInterceptor' to 'ClientInterceptorProtocol'
- Add a 'ClientInterceptor' base class for users to extend
- Add head and tail interceptors
- Add 'AnyClientInterceptor' which wraps the above.
- Build out a little more of the pipeline; note that this is by no means
  complete yet but it gets us to a stage where we can fire events
  through it.
- Move next inbound/outbound context fetching from context to pipeline
  because the context doesn't need to know the ordering of interceptors.
- Add a couple of simple pipeline tests.

Result:

We have a basic interceptor pipeline and a way for users to define
interceptors.
glbrntt added a commit that referenced this pull request Nov 12, 2020
Motivation:

An interceptor pipeline needs interceptors, and users need to be able to
create their own interceptors.

Modifications:

- Rename 'ClientInterceptor' to 'ClientInterceptorProtocol'
- Add a 'ClientInterceptor' base class for users to extend
- Add head and tail interceptors
- Add 'AnyClientInterceptor' which wraps the above.
- Build out a little more of the pipeline; note that this is by no means
  complete yet but it gets us to a stage where we can fire events
  through it.
- Move next inbound/outbound context fetching from context to pipeline
  because the context doesn't need to know the ordering of interceptors.
- Add a couple of simple pipeline tests.

Result:

We have a basic interceptor pipeline and a way for users to define
interceptors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🆕 semver/minor Adds new public API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants