Class ConfigServerHostBuilderExtensions
Inheritance
Namespace: Steeltoe.Extensions.Configuration.ConfigServer
Assembly: Steeltoe.Extensions.Configuration.ConfigServerCore.dll
Syntax
public static class ConfigServerHostBuilderExtensions : object
Methods
| Edit this page View SourceAddConfigServer(IHostBuilder, ILoggerFactory)
Add Config Server and Cloud Foundry as application configuration sources. Add Config Server health check contributor to the service container.
Declaration
public static IHostBuilder AddConfigServer(this IHostBuilder hostBuilder, ILoggerFactory loggerFactory = null)
Parameters
Type | Name | Description |
---|---|---|
IHostBuilder | hostBuilder | |
ILoggerFactory | loggerFactory |
Returns
Type | Description |
---|---|
IHostBuilder |
AddConfigServer(IWebHostBuilder, ILoggerFactory)
Add Config Server and Cloud Foundry as application configuration sources. Add Config Server health check contributor to the service container.
Declaration
public static IWebHostBuilder AddConfigServer(this IWebHostBuilder hostBuilder, ILoggerFactory loggerFactory = null)
Parameters
Type | Name | Description |
---|---|---|
IWebHostBuilder | hostBuilder | |
ILoggerFactory | loggerFactory |
Returns
Type | Description |
---|---|
IWebHostBuilder |
UseCloudFoundryHosting(IWebHostBuilder, Nullable<Int32>)
Enable the application to listen on port(s) provided by the environment at runtime
Declaration
public static IWebHostBuilder UseCloudFoundryHosting(this IWebHostBuilder webHostBuilder, int? runLocalPort = null)
Parameters
Type | Name | Description |
---|---|---|
IWebHostBuilder | webHostBuilder | Your WebHostBuilder |
System.Nullable<System.Int32> | runLocalPort | Set the port number with code so you don't need to set environment variables locally |
Returns
Type | Description |
---|---|
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