Add API endpoint to leave cluster gracefully, hard leave on exit

This commit is contained in:
Ingo Oppermann
2023-06-06 11:22:53 +02:00
parent 8829b8fff0
commit 1f6f7c9f59
7 changed files with 133 additions and 18 deletions

View File

@@ -1654,9 +1654,6 @@ func (a *api) start() error {
debug.SetMemoryLimit(math.MaxInt64)
}
//p, _ := psutil.NewProcess(int32(os.Getpid()), false)
//a.process = p
// Start the restream processes
restream.Start()
@@ -1699,7 +1696,7 @@ func (a *api) stop() {
}
if a.cluster != nil {
a.cluster.Leave("", "")
// Hard shutdown without gracefully leaving the cluster
a.cluster.Shutdown()
}