2using System.Collections.Generic;
7using Microsoft.Extensions.Options;
42 [Service] IOptionsSnapshot<SwarmConfiguration> swarmConfigurationOptions,
45 ArgumentNullException.ThrowIfNull(swarmConfigurationOptions);
46 ArgumentNullException.ThrowIfNull(swarmService);
48 var ourIdentifier = swarmConfigurationOptions.Value.Identifier;
49 if (ourIdentifier ==
null)
64 ArgumentNullException.ThrowIfNull(swarmService);
65 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.
UpdateInformation UpdateInformation()
Gets the Types.UpdateInformation for the swarm.
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 tgstation-server installation.
Used for swarm operations. Functions may be no-op based on configuration.