public ConsulGatewayListProvider(ILogger <ConsulGatewayListProvider> logger, IOptions <ConsulClusteringClientOptions> options, IOptions <GatewayOptions> gatewayOptions, IOptions <ClusterClientOptions> clusterClientOptions)
 {
     this.logger       = logger;
     this.clusterId    = clusterClientOptions.Value.ClusterId;
     this.maxStaleness = gatewayOptions.Value.GatewayListRefreshPeriod;
     this.options      = options.Value;
 }
Esempio n. 2
0
        protected override IGatewayListProvider CreateGatewayListProvider(ILogger logger)
        {
            ConsulTestUtils.EnsureConsul();
            var options = new ConsulClusteringClientOptions()
            {
                Address = new Uri(this.connectionString)
            };

            return(new ConsulGatewayListProvider(loggerFactory.CreateLogger <ConsulGatewayListProvider>(), Options.Create(options), this.gatewayOptions, this.clusterOptions));
        }