public MongoGatewayListProvider(
     ILogger <MongoGatewayListProvider> logger,
     IOptions <ClusterOptions> clusterOptions,
     IOptions <GatewayOptions> gatewayOptions,
     IOptions <MongoDBGatewayListProviderOptions> options)
 {
     this.logger       = logger;
     this.options      = options.Value;
     this.clusterId    = clusterOptions.Value.ClusterId;
     this.maxStaleness = gatewayOptions.Value.GatewayListRefreshPeriod;
 }
Esempio n. 2
0
 public MongoGatewayListProvider(
     IMongoClientFactory mongoClientFactory,
     ILogger <MongoGatewayListProvider> logger,
     IOptions <ClusterOptions> clusterOptions,
     IOptions <GatewayOptions> gatewayOptions,
     IOptions <MongoDBGatewayListProviderOptions> options)
 {
     this.mongoClient  = mongoClientFactory.Create(options.Value, "Membership");
     this.logger       = logger;
     this.options      = options.Value;
     this.clusterId    = clusterOptions.Value.ClusterId;
     this.MaxStaleness = gatewayOptions.Value.GatewayListRefreshPeriod;
 }