element/shutdown.go
Michael Crosby 382f52335c Remove GRPC from element
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.
2018-09-14 08:25:56 -04:00

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()
}