382f52335c
I came in like a wrecking ball.... I think the grpc server and rpc configuration for the server should be handled outside of this package. There are many ways to configure it and we need more flexability on start and shutdown for grpc services. Signal handling should be in the caller.
9 lines
243 B
Go
9 lines
243 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
|
|
}
|
|
return a.members.Shutdown()
|
|
}
|