-
Notifications
You must be signed in to change notification settings - Fork 78
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
KO-382 cleanup after scaleup #80
Conversation
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.
Looks great!
body: body, | ||
} | ||
|
||
_, err = callNodeMgmtEndpoint(client, request, "application/json") |
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.
there is an http
constant for this, I think
postData := make(map[string]interface{}) | ||
if jobs > -1 { | ||
postData["jobs"] = strconv.Itoa(jobs) | ||
} | ||
|
||
if keyspaceName != "" { | ||
postData["keyspace_name"] = keyspaceName | ||
} | ||
|
||
if len(tables) > 0 { | ||
postData["tables"] = tables | ||
} |
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.
Do you think this is nicer? It's not exactly the same logic, yet
postData := struct {
Jobs string `json:"jobs"`
Keyspace string `json:"keyspace_name"`
Tables []string `json:"tables"`
}{
Jobs: strconv.Itoa(jobs),
Keyspace: keyspaceName,
Tables: tables,
}
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
No description provided.