15 lines
290 B
Go
15 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
|
||
|
}
|