2using System.Collections.Generic;
6using HotChocolate.Authorization;
8using Microsoft.Extensions.Options;
60 [Service] IOptionsSnapshot<SwarmConfiguration> swarmConfigurationOptions,
63 ArgumentNullException.ThrowIfNull(swarmConfigurationOptions);
64 ArgumentNullException.ThrowIfNull(swarmService);
66 if (swarmConfigurationOptions.Value.PrivateKey ==
null)
70 swarmConfigurationOptions.Value.Identifier!,
83 ArgumentNullException.ThrowIfNull(swarmService);
84 return swarmService.GetSwarmServers()?.Select(x =>
new SwarmNode(x)).ToList();
Exception representing ErrorMessageResponses.
Represents a tgstation-server swarm.
List< SwarmNode >? Nodes([Service] ISwarmService swarmService)
Gets all SwarmNode servers in the swarm.
UpdateInformation UpdateInformation()
Gets the Types.UpdateInformation for the swarm.
UsersRepository Users()
Gets the swarm's UsersRepository.
UserGroupsRepository UserGroups()
Gets the swarm's UserGroupsRepository.
IServerNode CurrentNode([Service] IOptionsSnapshot< SwarmConfiguration > swarmConfigurationOptions, [Service] ISwarmService swarmService)
Gets the connected SwarmNode server.
int ProtocolMajorVersion()
Gets the swarm protocol major version in use.
IQueryable< Instance > Instances()
Access all instances in the ServerSwarm.
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 UserGroups.
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.
ErrorCode
Types of Response.ErrorMessageResponses that the API may return.