コード例 #1
0
        public UserResolver(ResourceProvider resourceProvider, IForgeOSS forgeOSS, IBucketKeyProvider bucketKeyProvider,
                            LocalCache localCache, ILogger <UserResolver> logger, ProfileProvider profileProvider)
        {
            _forgeOSS          = forgeOSS;
            _localCache        = localCache;
            _logger            = logger;
            _bucketKeyProvider = bucketKeyProvider;
            _profileProvider   = profileProvider;

            AnonymousBucket = new OssBucket(_forgeOSS, _bucketKeyProvider.AnonymousBucketKey, logger);
        }
コード例 #2
0
 public MetricAggregator(
     IMetricScope metricScope,
     IBucketKeyProvider bucketKeyProvider,
     IAirlockClient airlockClient,
     TimeSpan cooldownPeriod,
     Borders borders,
     string eventsRoutingKey)
 {
     aggregatorMetrics = new AggregatorMetrics(metricScope.WithTags(new Dictionary <string, string>
     {
         { MetricsTagNames.Type, "aggregation" }, { "routingKey", eventsRoutingKey }
     }));
     this.bucketKeyProvider = bucketKeyProvider;
     this.airlockClient     = airlockClient;
     this.cooldownPeriod    = cooldownPeriod;
     this.borders           = borders;
     metricsRoutingKey      = RoutingKey.ReplaceSuffix(eventsRoutingKey, RoutingKey.MetricsSuffix);
     buckets = new ConcurrentDictionary <BucketKey, IBucket>();
 }
コード例 #3
0
 public UploadAwsS3Convention(
     ILog log,
     ICalamariFileSystem fileSystem,
     AwsEnvironmentGeneration awsEnvironmentGeneration,
     string bucket,
     S3TargetMode targetMode,
     IProvideS3TargetOptions optionsProvider,
     IBucketKeyProvider bucketKeyProvider,
     ISubstituteInFiles substituteInFiles
     )
 {
     this.log        = log;
     this.fileSystem = fileSystem;
     this.awsEnvironmentGeneration = awsEnvironmentGeneration;
     this.bucket            = bucket;
     this.targetMode        = targetMode;
     this.optionsProvider   = optionsProvider;
     this.bucketKeyProvider = bucketKeyProvider;
     this.substituteInFiles = substituteInFiles;
     this.md5HashSupported  = HashCalculator.IsAvailableHashingAlgorithm(MD5.Create);
 }
コード例 #4
0
 public void Setup()
 {
     sut = new BucketKeyProvider();
 }