Skip to content

Watchdog

The Watchdog feature in Void is designed to monitor the health of the Void Proxy and schedule a restart if required. This is particularly useful for long-running processes or when running Void in a production environment.

Watchdog is disabled by default. To enable it, you need to set the Enabled setting in the configuration file to true.

/health endpoint is used to check the health of the Void Proxy.

Terminal window
$ curl http://localhost:80/health
OK
  • 200 OK: The Void Proxy is running and healthy.
  • 503 Service Unavailable: The Void Proxy is not running or unhealthy.
  • OK: The Void Proxy is running and healthy.
  • PAUSED: The Void Proxy is not accepting connections.
  • STOPPING: The Void Proxy is shutting down.

Status Code 200 OK may be in any combination of above responses.
It just means that the Void Proxy is still running and healthy.

/bound endpoint is used to check if the Void Proxy is bound and accepting incoming connections.

Terminal window
$ curl http://localhost:80/bound
OK
  • 200 OK: The Void Proxy is bound and accepting connections.
  • 503 Service Unavailable: The Void Proxy is not accepting connections.

Responses are the same as for the /health endpoint.

/pause endpoint is used to pause the Void Proxy. This will stop accepting new connections but connected players will still be able to play.

Terminal window
$ curl http://localhost:80/pause

/continue endpoint is used to continue the Void Proxy. This will allow new connections to be accepted again.

Terminal window
$ curl http://localhost:80/continue

/stop endpoint is used to stop the Void Proxy. This will kick all players and shut down the Void Proxy immediately.

Terminal window
$ curl http://localhost:80/stop

/slow-stop endpoint is used to pause accepting new connections and wait for existing players to leave, then shut down the Void Proxy.

Terminal window
$ curl http://localhost:80/slow-stop

Once slow-stop is called, you cannot call /continue.
Proxy will wait indefinitely for players to leave, but you can call /stop to forcefully shut down the Void Proxy.