Example #1
0
 public ExecutionManager(
     ContainerPool containerPool,
     DockerClient dockerClient,
     ContainerNameFormat containerNameFormat,
     ExecutionProcessor executionProcessor,
     CrashSuspensionManager crashSuspensionManager,
     ContainerCleanupWorker cleanupWorker
     )
 {
     _containerPool          = containerPool;
     _dockerClient           = dockerClient;
     _containerNameFormat    = containerNameFormat;
     _executionProcessor     = executionProcessor;
     _crashSuspensionManager = crashSuspensionManager;
     _cleanupWorker          = cleanupWorker;
 }
        public ContainerAllocationWorker(
            ContainerPool containerPool,
            DockerClient dockerClient,
            ContainerNameFormat containerNameFormat,
            ExecutionProcessor warmupExecutionProcessor,
            ContainerCleanupWorker containerCleanup,
            ILogger <ContainerAllocationWorker> logger
            )
        {
            _containerPool            = containerPool;
            _dockerClient             = dockerClient;
            _containerNameFormat      = containerNameFormat;
            _warmupExecutionProcessor = warmupExecutionProcessor;
            _containerCleanup         = containerCleanup;
            _logger = logger;

            _warmupAssemblyBytes = File.ReadAllBytes(
                Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "SharpLab.Container.Warmup.dll")
                );
        }