element/shutdown.go
Evan Hazlett 752f9b0d09
initial commit
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2018-06-04 12:40:04 -04:00

14 lines
290 B
Go

package element
// Shutdown causes the local node to leave the cluster and perform a clean shutdown
func (a *Agent) Shutdown() error {
if err := a.members.Leave(nodeUpdateTimeout); err != nil {
return err
}
if err := a.members.Shutdown(); err != nil {
return err
}
return nil
}