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:
Renan DelValle 2017-09-25 15:45:40 -07:00
parent 0d3126c468
commit f59f0bbdc3
2 changed files with 25 additions and 15 deletions

View file

@ -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")