コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TtlScheduler"/> class.
 /// </summary>
 /// <param name="options">configuration options</param>
 /// <param name="client">the Consul client</param>
 /// <param name="logger">optional logger</param>
 public TtlScheduler(ConsulDiscoveryOptions options, IConsulClient client, ILogger <TtlScheduler> logger = null)
 {
     _options = options;
     _client  = client;
     _logger  = logger;
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ConsulHealthContributor"/> class.
 /// </summary>
 /// <param name="client">a Consul client to use for health checks</param>
 /// <param name="options">configuration options</param>
 /// <param name="logger">optional logger</param>
 public ConsulHealthContributor(IConsulClient client, ConsulDiscoveryOptions options, ILogger <ConsulHealthContributor> logger = null)
 {
     _client  = client ?? throw new ArgumentNullException(nameof(client));
     _options = options ?? throw new ArgumentNullException(nameof(options));
     _logger  = logger;
 }