Class ConfigurationExtensions
Configure ASP.NET Core application to use dedicated web host and separated port for Raft endpoint.
Inherited Members
Namespace: DotNext.Net.Cluster.Consensus.Raft.Http.Hosting
Assembly: DotNext.AspNetCore.Cluster.dll
Syntax
[CLSCompliant(false)]
public static class ConfigurationExtensions
Methods
| Improve this Doc View SourceConfigureLocalNode(IServiceCollection, IConfiguration)
Allows to inject
Declaration
public static IServiceCollection ConfigureLocalNode(this IServiceCollection services, IConfiguration memberConfig)
Parameters
| Type | Name | Description |
|---|---|---|
| IServiceCollection | services | The collection of services. |
| IConfiguration | memberConfig | The configuration of local cluster node. |
Returns
| Type | Description |
|---|---|
| IServiceCollection | The modified collection of services. |
Remarks
This method should not be used together with JoinCluster(IHostBuilder) because it has the same semantics. It's here just for corner case when you want to implement choice between hosted and embedded mode in the same app or library.
JoinCluster(IHostBuilder)
Allows to inject
Declaration
public static IHostBuilder JoinCluster(this IHostBuilder builder)
Parameters
| Type | Name | Description |
|---|---|---|
| IHostBuilder | builder | The builder of main application host. |
Returns
| Type | Description |
|---|---|
| IHostBuilder | The builder of the application host. |
JoinCluster(IHostBuilder, Func<IConfiguration, IHostEnvironment, IConfiguration>)
Allows to inject
Declaration
public static IHostBuilder JoinCluster(this IHostBuilder builder, Func<IConfiguration, IHostEnvironment, IConfiguration> memberConfig)
Parameters
| Type | Name | Description |
|---|---|---|
| IHostBuilder | builder | The builder of main application host. |
| Func<IConfiguration, IHostEnvironment, IConfiguration> | memberConfig | The delegate that allows to resolve location of local member configuration. |
Returns
| Type | Description |
|---|---|
| IHostBuilder | The builder of the application host. |
JoinCluster(IHostBuilder, String)
Allows to inject
Declaration
public static IHostBuilder JoinCluster(this IHostBuilder builder, string memberConfigSection)
Parameters
| Type | Name | Description |
|---|---|---|
| IHostBuilder | builder | The builder of main application host. |
| String | memberConfigSection | The name of local member configuration section. |
Returns
| Type | Description |
|---|---|
| IHostBuilder | The builder of the application host. |