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

[Issue 52]Add interceptor #314

Merged
merged 9 commits into from
Jul 14, 2020
Merged

Conversation

snowcrumble
Copy link
Contributor

@snowcrumble snowcrumble commented Jul 8, 2020

Motivation

Add A chain of interceptors for Producer and Consumer as an option, these interceptors will be called at some points, it can be used for tracing, metrics, and so on.

Modifications

  • Add two files for interceptor definition.
  • Call interceptor's methods at appropriate position.

Verifying this change

  • Make sure that the change passes the CI checks.

This change added tests and can be verified as follows:

  • Added unit tests for all interceptor's methods.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): no
  • The public API: yes
  • The schema: no
  • The default values of configurations: no
  • The wire protocol: no

Documentation

  • Does this pull request introduce a new feature? yes
  • If yes, how is the feature documented? GoDocs

@snowcrumble snowcrumble changed the title Add interceptor [#52]Add interceptor Jul 8, 2020
@snowcrumble snowcrumble changed the title [#52]Add interceptor [Issue 52]Add interceptor Jul 8, 2020
@sijie sijie requested review from wolfstudy and merlimat July 8, 2020 17:30
pulsar/consumer_test.go Outdated Show resolved Hide resolved
pulsar/consumer_test.go Outdated Show resolved Hide resolved
@wolfstudy wolfstudy added this to the 0.2.0 milestone Jul 9, 2020
@wolfstudy
Copy link
Member

@snowcrumble Can you merge the master code and fix conflict?

Copy link
Member

@wolfstudy wolfstudy left a comment

Choose a reason for hiding this comment

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

Thanks to @snowcrumble LGTM +1

Copy link
Member

@wolfstudy wolfstudy left a comment

Choose a reason for hiding this comment

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

LGTM +1

@wolfstudy wolfstudy merged commit b434511 into apache:master Jul 14, 2020
@snowcrumble snowcrumble deleted the add-interceptor branch July 14, 2020 03:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants