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); }
public ResultPublisher(IDomainResultStore resultStore, ITimeoutProvider timeoutProvider) { _resultStore = resultStore; // Allow twice the read time _timeout = (int)(timeoutProvider.Timeout * 2); }
public static IPAddressConsensusEngine Run(IIPAddressProviderExecutor executor, ITimeoutProvider timeoutProvider, AddressLookupSettingsConfig config, IEnumerable <PublicIPAddressProviderConfig> providers) => new IPAddressConsensusEngine(executor, timeoutProvider, config, providers);
public ResultAwaiter(IDomainResultStore resultStore, ITimeoutProvider timeoutProvider) { _resultStore = resultStore; _waitTimeout = timeoutProvider.Timeout; _logger.DebugFormat("Timeout is {0}", _waitTimeout); }