-
Notifications
You must be signed in to change notification settings - Fork 185
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
Simple leader selection utility #7160
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #7160 +/- ##
==========================================
+ Coverage 41.24% 41.25% +0.01%
==========================================
Files 2171 2171
Lines 190064 190091 +27
==========================================
+ Hits 78385 78431 +46
+ Misses 105129 105121 -8
+ Partials 6550 6539 -11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
func run(*cobra.Command, []string) { | ||
|
||
var snapshot inmem.EncodableSnapshot | ||
err := json.NewDecoder(os.Stdin).Decode(&snapshot) |
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.
what's the usage? something like
cat snapshot.json | util ...
would it make sense to accept a path to the snapshot file as an argument instead?
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.
That is the usage. We were starting from some jq
queries so the shortest path was something with the same input scheme. I don't mind adding the file IO in the command -- that is probably more consistent with the rest of the util commands.
A basic utility for reading leader selection for a view range from a snapshot input. Made this last week while debugging networking issues.