752f9b0d09
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
14 lines
290 B
Go
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
|
|
}
|