/// <nodoc />
        public DeploymentProxyService(
            ProxyServiceConfiguration configuration,
            HostParameters hostParameters,
            IAbsFileSystem fileSystem = null,
            IClock clock = null,
            IDeploymentServiceClient client = null)
        {
            clock ??= SystemClock.Instance;
            Configuration        = configuration;
            Root                 = new AbsolutePath(configuration.RootPath);
            Clock                = clock;
            ContentCacheRequests = new VolatileMap <(string, string), AsyncLazy <BoolResult> >(Clock);
            ProxyAddress         = new VolatileMap <UnitValue, AsyncLazy <string> >(Clock);
            Client               = client ?? DeploymentLauncherHost.Instance.CreateServiceClient();
            HostParameters       = hostParameters;

            DownloadQueue = new ActionQueue(configuration.DownloadConcurrency ?? Environment.ProcessorCount);

            Store = new FileSystemContentStoreInternal(
                fileSystem ?? new PassThroughFileSystem(),
                Clock,
                DeploymentUtilities.GetCasRootPath(Root),
                new ConfigurationModel(new ContentStoreConfiguration(new MaxSizeQuota($"{Configuration.RetentionSizeGb}GB"))),
                settings: new ContentStoreSettings()
            {
                TraceFileSystemContentStoreDiagnosticMessages = true,
            });
        }
示例#2
0
        /// <nodoc />
        public ContentCacheService(
            ContentCacheConfiguration configuration,
            IPushFileHandler pushFileHandler,
            IDistributedStreamStore streamStore,
            IDeploymentServiceClient client = null)
        {
            Configuration        = configuration;
            StreamStore          = streamStore;
            PushFileHandler      = pushFileHandler;
            ContentCacheRequests = new VolatileMap <string, AsyncLazy <BoolResult> >(Clock);
            Client = client ?? DeploymentLauncherHost.Instance.CreateServiceClient();

            DownloadQueue = new ActionQueue(configuration.DownloadConcurrency ?? Environment.ProcessorCount);
        }
示例#3
0
 public Client(IDeploymentServiceClient inner)
 {
     _inner = inner;
 }