2using System.Collections.Generic;
7using Microsoft.Extensions.Options;
32 ArgumentNullException.ThrowIfNull(serverControl);
33 return serverControl.UpdateInProgress;
56 [Service] IOptionsSnapshot<SwarmConfiguration> swarmConfigurationOptions,
59 ArgumentNullException.ThrowIfNull(swarmConfigurationOptions);
60 ArgumentNullException.ThrowIfNull(swarmService);
62 var ourIdentifier = swarmConfigurationOptions.Value.Identifier;
63 if (ourIdentifier ==
null)
78 ArgumentNullException.ThrowIfNull(swarmService);
79 return swarmService.GetSwarmServers()?.Select(x =>
new SwarmNode(x)).ToList();
Represents a tgstation-server swarm.
List< SwarmNode >? Nodes([Service] ISwarmService swarmService)
Gets all SwarmNode servers in the swarm.
int ProtocolMajorVersion
Gets the swarm protocol major version in use.
Users Users()
Gets the swarm's Types.Users.
bool UpdateInProgress([Service] IServerControl serverControl)
If there is a swarm update in progress.
IServerNode CurrentNode([Service] IOptionsSnapshot< SwarmConfiguration > swarmConfigurationOptions, [Service] ISwarmService swarmService)
Gets the connected SwarmNode server.
A IServerNode not running as part of a larger ServerSwarm.
Represents a node server in a swarm.
static ? SwarmNode GetSwarmNode(string identifier, [Service] ISwarmService swarmService)
Node resolver for SwarmNodes.
Wrapper for accessing Users.
Attribute for bringing in the master versions list from MSBuild that aren't embedded into assemblies ...
string RawSwarmProtocolVersion
The Version string of the TGS swarm protocol.
static MasterVersionsAttribute Instance
Return the Assembly's instance of the MasterVersionsAttribute.
Represents a service that may take an updated Host assembly and run it, stopping the current assembly...
Represents a tgstation-server installation.
Used for swarm operations. Functions may be no-op based on configuration.