Exemple #1
0
        protected PostgresRequestProcessorBootstrapperBase(
            TOptions nodeOptions,
            ILoggerFactory loggerFactory,
            IServiceProvider serviceProvider) : base(nodeOptions, loggerFactory, serviceProvider)
        {
            nodeOptions.PostgresEventReceiver.AssertValid();

            EventReceiverOptions = nodeOptions.PostgresEventReceiver;
        }
Exemple #2
0
        public DbEventReceiver(
            PostgresEventReceiverOptions eventReceiverOptions,
            MonitoredDatabase monitoredDatabase,
            ILogger <DbEventReceiver> logger)
        {
            _eventReceiverOptions = eventReceiverOptions ?? throw new ArgumentNullException(nameof(eventReceiverOptions));
            eventReceiverOptions.AssertValid();
            _dbOptions = monitoredDatabase ?? throw new ArgumentNullException(nameof(monitoredDatabase));
            _logger    = logger ?? throw new ArgumentNullException(nameof(logger));

            _eventsToSubscribe = new HashSet <string>(eventReceiverOptions.EventNames);
        }