Recreated plugin with new project template. Started implementing server system daemon
This commit is contained in:
47
MoonlightServers.Daemon/Models/RuntimeConfiguration.cs
Normal file
47
MoonlightServers.Daemon/Models/RuntimeConfiguration.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
namespace MoonlightServers.Daemon.Models;
|
||||
|
||||
public record RuntimeConfiguration(
|
||||
RuntimeLimitsConfig Limits,
|
||||
RuntimeStorageConfig Storage,
|
||||
RuntimeTemplateConfig Template,
|
||||
RuntimeNetworkConfig Network,
|
||||
RuntimeEnvironmentConfig Environment
|
||||
);
|
||||
|
||||
public record RuntimeLimitsConfig(
|
||||
int? CpuPercent,
|
||||
int? Threads,
|
||||
int? MemoryMb,
|
||||
int? SwapMb
|
||||
);
|
||||
|
||||
public record RuntimeStorageConfig(
|
||||
string Provider,
|
||||
Dictionary<string, string> Options,
|
||||
int LimitMb
|
||||
);
|
||||
|
||||
public record RuntimeTemplateConfig(
|
||||
string DockerImage,
|
||||
string StartupCommand,
|
||||
string StopCommand,
|
||||
string[] OnlineTexts
|
||||
);
|
||||
|
||||
public record RuntimeNetworkConfig(
|
||||
string[] Networks,
|
||||
string? FriendlyName,
|
||||
string? OutgoingIpAddress,
|
||||
RuntimePortConfig? MainPort,
|
||||
RuntimePortConfig[] Ports
|
||||
);
|
||||
|
||||
public record RuntimePortConfig(
|
||||
string IpAddress,
|
||||
int Port
|
||||
);
|
||||
|
||||
public record RuntimeEnvironmentConfig(
|
||||
Dictionary<string, string> Labels,
|
||||
Dictionary<string, string> Variables
|
||||
);
|
||||
Reference in New Issue
Block a user