tgstation-server 6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
IServerControl.cs
Go to the documentation of this file.
1using System;
2using System.Threading.Tasks;
3
5{
9 public interface IServerControl
10 {
14 bool WatchdogPresent { get; }
15
19 bool UpdateInProgress { get; }
20
27 bool TryStartUpdate(IServerUpdateExecutor updateExecutor, Version newVersion);
28
35
40 ValueTask Restart();
41
47 ValueTask GracefulShutdown(bool detach);
48
54 ValueTask Die(Exception? exception);
55 }
56}
Represents the lifetime of a IRestartHandler registration.
Represents a service that may take an updated Host assembly and run it, stopping the current assembly...
ValueTask GracefulShutdown(bool detach)
Gracefully shutsdown the Host.
bool WatchdogPresent
true if live updates are supported, false. TryStartUpdate(IServerUpdateExecutor, Version) and Restart...
IRestartRegistration RegisterForRestart(IRestartHandler handler)
Register a given handler to run before stopping the server for a restart.
ValueTask Restart()
Restarts the Host.
bool UpdateInProgress
Whether or not the server is currently updating.
bool TryStartUpdate(IServerUpdateExecutor updateExecutor, Version newVersion)
Attempt to update with a given updateExecutor .
ValueTask Die(Exception? exception)
Kill the server with a fatal exception.