public ObjectEventsProcessingJob(
            ILogger <ObjectEventsProcessingJob> logger,
            IObjectsStorageReader objectsStorageReaderForVersions,
            IObjectsStorageReader objectsStorageReaderForBinaries,
            KafkaOptions kafkaOptions,
            IEventSender eventSender)
        {
            _objectVersionsTopic = kafkaOptions.ObjectVersionsTopic;
            _binariesUsingsTopic = kafkaOptions.BinariesReferencesTopic;

            _logger = logger;
            _objectsStorageReaderForVersions = objectsStorageReaderForVersions;
            _objectsStorageReaderForBinaries = objectsStorageReaderForBinaries;
            _eventSender          = eventSender;
            _versionEventReceiver = new EventReceiver(
                logger,
                kafkaOptions,
                $"{VersionsGroupId}-{kafkaOptions.ConsumerGroupToken}",
                new[] { kafkaOptions.ObjectEventsTopic });
            _binariesEventReceiver = new EventReceiver(
                logger,
                kafkaOptions,
                $"{BinariesGroupId}-{kafkaOptions.ConsumerGroupToken}",
                new[] { kafkaOptions.ObjectEventsTopic });
        }
Beispiel #2
0
 public ObjectsController(
     IObjectsStorageReader objectsStorageReader,
     IObjectsManagementService objectsManagementService,
     ILogger <ObjectsController> logger)
 {
     _logger = logger;
     _objectsStorageReader     = objectsStorageReader;
     _objectsManagementService = objectsManagementService;
 }
 public PreviewController(
     ThrottlingOptions throttlingOptions,
     RawFileStorageInfoProvider rawFileStorageInfoProvider,
     IObjectsStorageReader objectsStorageReader,
     ImagePreviewService imagePreviewService)
 {
     _retryAfter = throttlingOptions.RetryAfter;
     _rawFileStorageInfoProvider = rawFileStorageInfoProvider;
     _objectsStorageReader       = objectsStorageReader;
     _imagePreviewService        = imagePreviewService;
 }
Beispiel #4
0
 public ObjectsManagementService(
     ILogger <ObjectsManagementService> logger,
     KafkaOptions kafkaOptions,
     VStoreContext context,
     ITemplatesStorageReader templatesStorageReader,
     IObjectsStorageReader objectsStorageReader,
     SessionStorageReader sessionStorageReader,
     DistributedLockManager distributedLockManager,
     IEventSender eventSender,
     MetricsProvider metricsProvider)
 {
     _logger  = logger;
     _context = context;
     _templatesStorageReader   = templatesStorageReader;
     _objectsStorageReader     = objectsStorageReader;
     _sessionStorageReader     = sessionStorageReader;
     _distributedLockManager   = distributedLockManager;
     _eventSender              = eventSender;
     _objectEventsTopic        = kafkaOptions.ObjectEventsTopic;
     _referencedBinariesMetric = metricsProvider.GetReferencedBinariesMetric();
 }
Beispiel #5
0
 public ObjectsManagementService(
     CephOptions cephOptions,
     KafkaOptions kafkaOptions,
     IS3Client s3Client,
     ITemplatesStorageReader templatesStorageReader,
     IObjectsStorageReader objectsStorageReader,
     SessionStorageReader sessionStorageReader,
     DistributedLockManager distributedLockManager,
     IEventSender eventSender,
     MetricsProvider metricsProvider)
 {
     _s3Client = s3Client;
     _templatesStorageReader   = templatesStorageReader;
     _objectsStorageReader     = objectsStorageReader;
     _sessionStorageReader     = sessionStorageReader;
     _distributedLockManager   = distributedLockManager;
     _eventSender              = eventSender;
     _bucketName               = cephOptions.ObjectsBucketName;
     _objectEventsTopic        = kafkaOptions.ObjectEventsTopic;
     _referencedBinariesMetric = metricsProvider.GetReferencedBinariesMetric();
 }
 public RawsController(RawFileStorageInfoProvider rawFileStorageInfoProvider, IObjectsStorageReader objectsStorageReader)
 {
     _rawFileStorageInfoProvider = rawFileStorageInfoProvider;
     _objectsStorageReader       = objectsStorageReader;
 }