How to know when a server in the cluster is shutdown?
When a server in the cluster is shut down, other servers can receive notifications and handle other operations.
https://github.com/topfreegames/pitaya/blob/cc949c447b0c2dfacb07ff3a8e2c845facaa02b3/cluster/etcd_service_discovery.go#L701-L704
There isn't any public api can do it now, if you actually want, you could implement by yourself according the code above.
This can actually be implemented using the listeners which is a public API
https://github.com/topfreegames/pitaya/blob/cc949c447b0c2dfacb07ff3a8e2c845facaa02b3/cluster/etcd_service_discovery.go#L230-L247
This can actually be implemented using the listeners which is a public API
https://github.com/topfreegames/pitaya/blob/cc949c447b0c2dfacb07ff3a8e2c845facaa02b3/cluster/etcd_service_discovery.go#L230-L247
That's really great! I nearly made a mistake.😂