Broker

interface Broker

Common interface for server brokers.

Functions

Link copied to clipboard

Should return the address used to connect players to the server.

Link copied to clipboard
abstract fun getStatus(): Status

Should return the current Status of the server

Link copied to clipboard
abstract fun isRunning(): Boolean

Should return true if the server is running, false otherwise.

Link copied to clipboard
abstract fun reconcile(config: ServerConfig): Result<Runnable?>

Trigger a reconciliation to resolve any differences between the server configuration and the runtime state of the server.

Link copied to clipboard
abstract fun removeServer(): Result<Unit>

Should remove the server.

Link copied to clipboard
abstract fun startServer(): Result<Unit>

Should start the server, and kick off any actions needed to get it ready to accept players.

Link copied to clipboard
abstract fun stopServer(): Result<Unit>

Should stop the server.