11ddd2290b
This endpoint causes the node it's hit to step down from active duty. It's a noop if the node isn't active or not running in HA mode. The node will wait one second before attempting to reacquire the lock, to give other nodes a chance to grab it. Fixes #1093
11 lines
187 B
Go
11 lines
187 B
Go
package api
|
|
|
|
func (c *Sys) StepDown() error {
|
|
r := c.c.NewRequest("PUT", "/v1/sys/step-down")
|
|
resp, err := c.c.RawRequest(r)
|
|
if err == nil {
|
|
defer resp.Body.Close()
|
|
}
|
|
return err
|
|
}
|