-
Notifications
You must be signed in to change notification settings - Fork 530
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
[INLONG-1570] Provide a more elegant way to set the parameter of config #1578
Conversation
Codecov Report
@@ Coverage Diff @@
## INLONG-25 #1578 +/- ##
==============================================
- Coverage 7.51% 7.48% -0.03%
Complexity 479 479
==============================================
Files 267 267
Lines 29500 29500
Branches 4843 4843
==============================================
- Hits 2216 2209 -7
- Misses 26810 26816 +6
- Partials 474 475 +1
Continue to review full report at Codecov.
|
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.
+1
@@ -744,3 +752,15 @@ func (c *consumer) closeAllBrokers() { | |||
} | |||
log.Infof("[CONSUMER] closeAllBrokers end, client=%s", c.clientID) | |||
} | |||
|
|||
// Invoke implementation of TubeMQ consumer. | |||
func (c *consumer) Invoke(config *config.Config, opts ...config.Option) (Consumer, error) { |
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.
Maybe you can use NewConfig(opts ..config.Option) *config.Config is a good idea.
And use NewConsumer(config *config.Config) to start.
d4fc27d
to
6727bae
Compare
Signed-off-by: Zijie Lu <wslzj40@gmail.com>
6727bae
to
52ccb6c
Compare
Signed-off-by: Zijie Lu wslzj40@gmail.com
Title Name: [INLONG-XYZ][component] Title of the pull request
where XYZ should be replaced by the actual issue number.
Fixes #1570
Motivation
Explain here the context, and why you're making that change. What is the problem you're trying to solve.
Modifications
Describe the modifications you've done.
Verifying this change
(Please pick either of the following options)
This change is a trivial rework / code cleanup without any test coverage.
(or)
This change is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows:
(example:)
Documentation