Class TtlScheduler
The default scheduler used to issue TTL requests to the Consul server
public class TtlScheduler : IScheduler, IDisposable
- Inheritance
-
TtlScheduler
- Implements
- Inherited Members
Constructors
TtlScheduler(IOptionsMonitor<ConsulDiscoveryOptions>, IConsulClient, ILogger<TtlScheduler>)
Initializes a new instance of the TtlScheduler class.
public TtlScheduler(IOptionsMonitor<ConsulDiscoveryOptions> optionsMonitor, IConsulClient client, ILogger<TtlScheduler> logger = null)
Parameters
optionsMonitorIOptionsMonitor<ConsulDiscoveryOptions>configuration options
clientIConsulClientthe Consul client
loggerILogger<TtlScheduler>optional logger
TtlScheduler(ConsulDiscoveryOptions, IConsulClient, ILogger<TtlScheduler>)
Initializes a new instance of the TtlScheduler class.
public TtlScheduler(ConsulDiscoveryOptions options, IConsulClient client, ILogger<TtlScheduler> logger = null)
Parameters
optionsConsulDiscoveryOptionsconfiguration options
clientIConsulClientthe Consul client
loggerILogger<TtlScheduler>optional logger
Methods
Add(string)
Adds an instances id to be checked
public void Add(string instanceId)
Parameters
instanceIdstringthe instance id
Dispose()
Remove all heart beats from scheduler
public void Dispose()
Dispose(bool)
protected virtual void Dispose(bool disposing)
Parameters
disposingbool
~TtlScheduler()
protected ~TtlScheduler()
Remove(string)
Remove an instance id from checking
public void Remove(string instanceId)
Parameters
instanceIdstringthe instance id