-
Notifications
You must be signed in to change notification settings - Fork 74
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
🌱 separate the clientid and sourceid for mqtt source client #305
🌱 separate the clientid and sourceid for mqtt source client #305
Conversation
/assign @qiujian16 |
/cc @morvencao |
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.
/lgtm
} | ||
|
||
func NewSourceOptions(mqttOptions *MQTTOptions, sourceID string) *options.CloudEventsSourceOptions { | ||
func NewSourceOptions(mqttOptions *MQTTOptions, clientID, sourceID string) *options.CloudEventsSourceOptions { | ||
return &options.CloudEventsSourceOptions{ | ||
CloudEventsOptions: &mqttSourceOptions{ | ||
MQTTOptions: *mqttOptions, | ||
errorChan: make(chan error), | ||
sourceID: sourceID, |
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.
why do we still need source id here, or the one in line 32?
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.
this is used to build the CloudEventsSourceOptions
, the line 29 is for the mqttSourceOptions
, we use it to build mqtt client (topic), and the line 32 is for the CloudEventsSourceOptions
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.
reorg the code, make this more clear
Signed-off-by: Wei Liu <liuweixa@redhat.com>
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: qiujian16, skeeey The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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.
/lgtm
66fe32e
into
open-cluster-management-io:main
Summary
Related issue(s)
Fixes #