47 lines
1008 B
C#
47 lines
1008 B
C#
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
|
|
); |