Setting retry for drain hosts to be a little more agressive for now. Added comments for go doc. DrainHosts now returns also returns a result type which will give API users the ability to operate directly on that object wihout using a response helper.
This commit is contained in:
parent
0d3126c468
commit
f59f0bbdc3
2 changed files with 25 additions and 15 deletions
|
@ -506,12 +506,12 @@ func main() {
|
|||
os.Exit(1)
|
||||
}
|
||||
hosts := strings.Split(drainCandidates, ",")
|
||||
resp, err := r.DrainHosts(hosts...)
|
||||
_, result, err := r.DrainHosts(hosts...)
|
||||
if err != nil {
|
||||
fmt.Printf("error: %+v\n", err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
fmt.Print(resp.String())
|
||||
fmt.Print(result.String())
|
||||
|
||||
default:
|
||||
fmt.Println("Command not supported")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue