Table of Contents

Class TtlScheduler

Namespace
Steeltoe.Discovery.Consul.Discovery
Assembly
Steeltoe.Discovery.Consul.dll

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

optionsMonitor IOptionsMonitor<ConsulDiscoveryOptions>

configuration options

client IConsulClient

the Consul client

logger ILogger<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

options ConsulDiscoveryOptions

configuration options

client IConsulClient

the Consul client

logger ILogger<TtlScheduler>

optional logger

Methods

Add(string)

Adds an instances id to be checked

public void Add(string instanceId)

Parameters

instanceId string

the instance id

Dispose()

Remove all heart beats from scheduler

public void Dispose()

Dispose(bool)

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

~TtlScheduler()

protected ~TtlScheduler()

Remove(string)

Remove an instance id from checking

public void Remove(string instanceId)

Parameters

instanceId string

the instance id