tgstation-server 6.12.3
The /tg/station 13 server suite
Loading...
Searching...
No Matches
ServerUpdateInitiator.cs
Go to the documentation of this file.
1using System;
2using System.Threading;
3using System.Threading.Tasks;
4
7
9{
12 {
17
22
29 {
30 this.swarmService = swarmService ?? throw new ArgumentNullException(nameof(swarmService));
31 this.serverUpdater = serverUpdater ?? throw new ArgumentNullException(nameof(serverUpdater));
32 }
33
35 public ValueTask<ServerUpdateResult> InitiateUpdate(IFileStreamProvider? fileStreamProvider, Version version, CancellationToken cancellationToken)
36 => serverUpdater.BeginUpdate(swarmService, fileStreamProvider, version, cancellationToken);
37 }
38}
ValueTask< ServerUpdateResult > InitiateUpdate(IFileStreamProvider? fileStreamProvider, Version version, CancellationToken cancellationToken)
Start the process of downloading and applying an update to a new server version .A ValueTask<TResult>...
readonly ISwarmService swarmService
The ISwarmService for the ServerUpdateInitiator.
readonly IServerUpdater serverUpdater
The IServerUpdater for the ServerUpdateInitiator.
ServerUpdateInitiator(ISwarmService swarmService, IServerUpdater serverUpdater)
Initializes a new instance of the ServerUpdateInitiator class.
ValueTask< ServerUpdateResult > BeginUpdate(ISwarmService swarmService, IFileStreamProvider? fileStreamProvider, Version version, CancellationToken cancellationToken)
Start the process of downloading and applying an update to a new server version .
Interface for asynchronously consuming Streams of files.
Used for swarm operations. Functions may be no-op based on configuration.