tgstation-server 6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
WindowsWatchdog.cs
Go to the documentation of this file.
1using System.Threading;
2using System.Threading.Tasks;
3
4using Microsoft.Extensions.Logging;
5
17
19{
24 {
45 IChatManager chat,
46 ISessionControllerFactory sessionControllerFactory,
47 IDmbFactory dmbFactory,
48 ISessionPersistor sessionPersistor,
50 IServerControl serverControl,
51 IAsyncDelayer asyncDelayer,
55 IIOManager gameIOManager,
56 IFilesystemLinkFactory linkFactory,
57 ILogger<WindowsWatchdog> logger,
58 DreamDaemonLaunchParameters initialLaunchParameters,
59 Api.Models.Instance instance,
60 bool autoStart)
61 : base(
62 chat,
63 sessionControllerFactory,
64 dmbFactory,
65 sessionPersistor,
67 serverControl,
68 asyncDelayer,
72 gameIOManager,
73 linkFactory,
74 logger,
75 initialLaunchParameters,
76 instance,
78 {
79 }
80
82 protected override async ValueTask ApplyInitialDmb(CancellationToken cancellationToken)
83 {
85 {
86 Logger.LogTrace("Not setting InitialDmb for engine type {engineType}", Server.EngineVersion.Engine);
87 return;
88 }
89
90 Server.ReattachInformation.InitialDmb = await DmbFactory.FromCompileJob(Server.CompileJob, "WindowsWatchdog Initial Deployment", cancellationToken);
91 }
92
95 => new SymlinkDmbProvider(dmbProvider, GameIOManager, LinkFactory);
96 }
97}
Information about an engine installation.
async ValueTask< IDmbProvider?> FromCompileJob(CompileJob compileJob, string reason, CancellationToken cancellationToken, [CallerFilePath] string? callerFile=null, [CallerLineNumber] int callerLine=default)
Gets a IDmbProvider for a given CompileJob.A ValueTask<TResult> resulting in a new IDmbProvider repre...
A IDmbProvider that uses filesystem links to change directory structure underneath the server process...
A IWatchdog that, instead of killing servers for updates, uses the wonders of filesystem links to swa...
IFilesystemLinkFactory LinkFactory
The IFilesystemLinkFactory for the AdvancedWatchdog.
readonly IJobManager jobManager
The IJobManager for the WatchdogBase.
ILogger< WatchdogBase > Logger
The ILogger for the WatchdogBase.
readonly bool autoStart
If the WatchdogBase should LaunchNoLock(bool, bool, bool, ReattachInformation, CancellationToken) in ...
readonly IEventConsumer eventConsumer
The IEventConsumer that is not the WatchdogBase.
readonly IRemoteDeploymentManagerFactory remoteDeploymentManagerFactory
The IRemoteDeploymentManagerFactory for the WatchdogBase.
readonly IIOManager diagnosticsIOManager
The IIOManager pointing to the Diagnostics directory.
IIOManager GameIOManager
The IIOManager for the WatchdogBase pointing to the Game directory.
A variant of the AdvancedWatchdog that works on Windows systems.
WindowsWatchdog(IChatManager chat, ISessionControllerFactory sessionControllerFactory, IDmbFactory dmbFactory, ISessionPersistor sessionPersistor, IJobManager jobManager, IServerControl serverControl, IAsyncDelayer asyncDelayer, IIOManager diagnosticsIOManager, IEventConsumer eventConsumer, IRemoteDeploymentManagerFactory remoteDeploymentManagerFactory, IIOManager gameIOManager, IFilesystemLinkFactory linkFactory, ILogger< WindowsWatchdog > logger, DreamDaemonLaunchParameters initialLaunchParameters, Api.Models.Instance instance, bool autoStart)
Initializes a new instance of the WindowsWatchdog class.
override SwappableDmbProvider CreateSwappableDmbProvider(IDmbProvider dmbProvider)
override async ValueTask ApplyInitialDmb(CancellationToken cancellationToken)
For managing connected chat services.
Provides absolute paths to the latest compiled .dmbs.
Consumes EventTypes and takes the appropriate actions.
Handles saving and loading ReattachInformation.
Represents a service that may take an updated Host assembly and run it, stopping the current assembly...
Interface for using filesystems.
Definition IIOManager.cs:13
Manages the runtime of Jobs.
EngineType
The type of engine the codebase is using.
Definition EngineType.cs:7