Table of Contents

Class ConfigServerHostedService

Namespace
Steeltoe.Extensions.Configuration.ConfigServer
Assembly
Steeltoe.Extensions.Configuration.ConfigServerBase.dll

Replace bootstrapped components used by ConfigServerConfigurationProvider with objects provided by Dependency Injection

public class ConfigServerHostedService : IHostedService
Inheritance
ConfigServerHostedService
Implements
Inherited Members

Constructors

ConfigServerHostedService(IConfigurationRoot, ILoggerFactory, IDiscoveryClient)

public ConfigServerHostedService(IConfigurationRoot configuration, ILoggerFactory loggerFactory, IDiscoveryClient discoveryClient = null)

Parameters

configuration IConfigurationRoot
loggerFactory ILoggerFactory
discoveryClient IDiscoveryClient

Methods

StartAsync(CancellationToken)

Triggered when the application host is ready to start the service.

public Task StartAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Indicates that the start process has been aborted.

Returns

Task

StopAsync(CancellationToken)

Triggered when the application host is performing a graceful shutdown.

public Task StopAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

Indicates that the shutdown process should no longer be graceful.

Returns

Task