Beispiel #1
0
        private IPAddressConsensusEngine(IIPAddressProviderExecutor executor, ITimeoutProvider timeoutProvider, AddressLookupSettingsConfig config, IEnumerable <PublicIPAddressProviderConfig> providers)
        {
            this.executor        = executor;
            this.timeoutProvider = timeoutProvider;
            this.providers       = GetSortedProviders(providers, config.RandomizeProviderOrder);
            minimumAgreeingEncryptedProviderCount      = config.MinimumAgreeingEncryptedProviderCount;
            minimumAgreeingEncryptedProviderPercentage = config.MinimumAgreeingEncryptedProviderPercentage;
            minimumAgreeingProviderCount      = config.MinimumAgreeingProviderCount;
            minimumAgreeingProviderPercentage = config.MinimumAgreeingProviderPercentage;

            var numInitialProvidersToQuery = minimumAgreeingProviderCount + 1;

            ExecuteNextProviders(numInitialProvidersToQuery);
        }
Beispiel #2
0
 public ResultPublisher(IDomainResultStore resultStore, ITimeoutProvider timeoutProvider)
 {
     _resultStore = resultStore;
     // Allow twice the read time
     _timeout = (int)(timeoutProvider.Timeout * 2);
 }
Beispiel #3
0
 public static IPAddressConsensusEngine Run(IIPAddressProviderExecutor executor, ITimeoutProvider timeoutProvider, AddressLookupSettingsConfig config, IEnumerable <PublicIPAddressProviderConfig> providers)
 => new IPAddressConsensusEngine(executor, timeoutProvider, config, providers);
Beispiel #4
0
 public ResultAwaiter(IDomainResultStore resultStore, ITimeoutProvider timeoutProvider)
 {
     _resultStore = resultStore;
     _waitTimeout = timeoutProvider.Timeout;
     _logger.DebugFormat("Timeout is {0}", _waitTimeout);
 }