Class ConfigServerHostBuilderExtensions
- Namespace
- Steeltoe.Extensions.Configuration.ConfigServer
- Assembly
- Steeltoe.Extensions.Configuration.ConfigServerCore.dll
public static class ConfigServerHostBuilderExtensions
- Inheritance
-
ConfigServerHostBuilderExtensions
- Inherited Members
Methods
AddConfigServer(IWebHostBuilder, ILoggerFactory)
Add Config Server and Cloud Foundry as application configuration sources. Add Config Server health check contributor to the service container.
public static IWebHostBuilder AddConfigServer(this IWebHostBuilder hostBuilder, ILoggerFactory loggerFactory = null)
Parameters
hostBuilder
IWebHostBuilderloggerFactory
ILoggerFactory
Returns
- IWebHostBuilder
IWebHostBuilder with config server and Cloud Foundry Config Provider attached
AddConfigServer(IHostBuilder, ILoggerFactory)
Add Config Server and Cloud Foundry as application configuration sources. Add Config Server health check contributor to the service container.
public static IHostBuilder AddConfigServer(this IHostBuilder hostBuilder, ILoggerFactory loggerFactory = null)
Parameters
hostBuilder
IHostBuilderloggerFactory
ILoggerFactory
Returns
- IHostBuilder
IHostBuilder with config server and Cloud Foundry Config Provider attached
UseCloudFoundryHosting(IWebHostBuilder, int?)
Enable the application to listen on port(s) provided by the environment at runtime
[Obsolete("This extension will be removed in a future release. Please use Steeltoe.Common.Hosting.UseCloudHosting() instead")]
public static IWebHostBuilder UseCloudFoundryHosting(this IWebHostBuilder webHostBuilder, int? runLocalPort = null)
Parameters
webHostBuilder
IWebHostBuilderYour WebHostBuilder
runLocalPort
int?Set the port number with code so you don't need to set environment variables locally
Returns
- IWebHostBuilder
Your WebHostBuilder, now listening on port(s) found in the environment or passed in
Remarks
runLocalPort parameter will not be used if an environment variable PORT is found