namespace RemoteExec.Server.Configuration;
public class ExecutionConfiguration
{
///
/// Maximum number of concurrent tasks. Default is ProcessorCount * 2.
///
public int? MaxConcurrentTasks { get; set; }
///
/// Timeout for assembly loading requests in seconds. Default is 30 seconds.
///
public int AssemblyLoadTimeoutSeconds { get; set; } = 30;
///
/// Type of execution environment to use. Default is "AssemblyLoadContext".
/// Options: "AssemblyLoadContext", "DockerContainer"
///
public string ExecutionEnvironment { get; set; } = "AssemblyLoadContext";
}
public class DockerExecutionConfiguration
{
///
/// Docker host URL. Default is unix:///var/run/docker.sock (Linux) or npipe://./pipe/docker_engine (Windows).
///
public string DockerHost { get; set; } = string.Empty;
///
/// Docker worker image name. Default is remoteexec-worker:latest.
///
public string WorkerImageName { get; set; } = "remoteexec-worker:latest";
///
/// Container timeout in seconds. Default is 300 (5 minutes).
///
public int ContainerTimeoutSeconds { get; set; } = 300;
///
/// Memory limit per container in MB. Default is 512 MB.
///
public long ContainerMemoryLimitMb { get; set; } = 512;
///
/// CPU shares per container. Default is 1024.
///
public long ContainerCpuShares { get; set; } = 1024;
///
/// Disable network access in containers. Default is true.
///
public bool DisableNetwork { get; set; } = true;
///
/// Use read-only filesystem in containers. Default is true.
///
public bool ReadOnlyFilesystem { get; set; } = true;
}