-
Notifications
You must be signed in to change notification settings - Fork 84
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
feat: add limit flag #59
Conversation
Signed-off-by: slayer321 <[email protected]>
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.
I am a bit skeptical about this approach. Would Atomic Counters be more feasible here and can avoid this much refactoring?
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. One comment provided inline. Please check if it can be handled.
|
||
} else { | ||
for fd.Running { | ||
res, err := fd.alertStream.Recv() |
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.
Is the possible to remove this code duplication ... I mean Recv() ... watchAlertsHelper()
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.
I think currently only code duplication section is this one
res, err := fd.logStream.Recv()
if err != nil {
fmt.Printf("Failed to receive an alert (%s)\n", err.Error())
break
}
_ = WatchLogsHelper(res, o)
I tried to add it in another function ... but it didn't help
Can you please fix the conflict by rebasing and please check the review comment ? Thanks |
Signed-off-by: slayer321 [email protected]
add limit flag
related issue #40
cc @nyrahul @daemon1024