Class TtlScheduler
The default scheduler used to issue TTL requests to the Consul server
Inheritance
System.Object
TtlScheduler
Namespace: Steeltoe.Discovery.Consul.Discovery
Assembly: Steeltoe.Discovery.Consul.dll
Syntax
public class TtlScheduler : object, IScheduler
Constructors
| Edit this page View SourceTtlScheduler(IOptionsMonitor<ConsulDiscoveryOptions>, IConsulClient, ILogger<TtlScheduler>)
Initializes a new instance of the TtlScheduler class.
Declaration
public TtlScheduler(IOptionsMonitor<ConsulDiscoveryOptions> optionsMonitor, IConsulClient client, ILogger<TtlScheduler> logger = null)
Parameters
Type | Name | Description |
---|---|---|
IOptionsMonitor<ConsulDiscoveryOptions> | optionsMonitor | configuration options |
IConsulClient | client | the Consul client |
ILogger<TtlScheduler> | logger | optional logger |
TtlScheduler(ConsulDiscoveryOptions, IConsulClient, ILogger<TtlScheduler>)
Initializes a new instance of the TtlScheduler class.
Declaration
public TtlScheduler(ConsulDiscoveryOptions options, IConsulClient client, ILogger<TtlScheduler> logger = null)
Parameters
Type | Name | Description |
---|---|---|
ConsulDiscoveryOptions | options | configuration options |
IConsulClient | client | the Consul client |
ILogger<TtlScheduler> | logger | optional logger |
Methods
| Edit this page View SourceAdd(String)
Adds an instances id to be checked
Declaration
public void Add(string instanceId)
Parameters
Type | Name | Description |
---|---|---|
System.String | instanceId | the instance id |
Dispose()
Remove all heart beats from scheduler
Declaration
public void Dispose()
Dispose(Boolean)
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
Finalize()
Declaration
protected void Finalize()
Remove(String)
Remove an instance id from checking
Declaration
public void Remove(string instanceId)
Parameters
Type | Name | Description |
---|---|---|
System.String | instanceId | the instance id |
Implements
IDisposable