Show / Hide Table of Contents

Class ConfigurationExtensions

Configure ASP.NET Core application to reuse application's web host and port for Raft endpoint.

Inheritance
Object
ConfigurationExtensions
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: DotNext.Net.Cluster.Consensus.Raft.Http.Embedding
Assembly: DotNext.AspNetCore.Cluster.dll
Syntax
[CLSCompliant(false)]
public static class ConfigurationExtensions

Methods

| Improve this Doc View Source

ConfigureLocalNode(IServiceCollection, IConfiguration)

Allows to inject , , to application services and establishes network communication with other cluster members.

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.

| Improve this Doc View Source

JoinCluster(IHostBuilder)

Allows to inject , , to application services and establishes network communication with other cluster members.

Declaration
public static IHostBuilder JoinCluster(this IHostBuilder builder)
Parameters
Type Name Description
IHostBuilder builder

The host builder.

Returns
Type Description
IHostBuilder

The modified host builder.

Remarks

Should be called exactly after ConfigureWebHost(IHostBuilder, Action<IWebHostBuilder>) or ConfigureWebHostDefaults(IHostBuilder, Action<IWebHostBuilder>).

| Improve this Doc View Source

JoinCluster(IHostBuilder, Func<IConfiguration, IHostEnvironment, IConfiguration>)

Allows to inject , , to application services and establishes network communication with other cluster members.

Declaration
public static IHostBuilder JoinCluster(this IHostBuilder builder, Func<IConfiguration, IHostEnvironment, IConfiguration> memberConfig)
Parameters
Type Name Description
IHostBuilder builder

The host builder.

Func<IConfiguration, IHostEnvironment, IConfiguration> memberConfig

The delegate that allows to resolve location of local member configuration.

Returns
Type Description
IHostBuilder

The modified host builder.

Remarks

Should be called exactly after ConfigureWebHost(IHostBuilder, Action<IWebHostBuilder>) or ConfigureWebHostDefaults(IHostBuilder, Action<IWebHostBuilder>).

| Improve this Doc View Source

JoinCluster(IHostBuilder, String)

Allows to inject , , to application services and establishes network communication with other cluster members.

Declaration
public static IHostBuilder JoinCluster(this IHostBuilder builder, string memberConfigSection)
Parameters
Type Name Description
IHostBuilder builder

The host builder.

String memberConfigSection

The name of local member configuration section.

Returns
Type Description
IHostBuilder

The modified host builder.

Remarks

Should be called exactly after ConfigureWebHost(IHostBuilder, Action<IWebHostBuilder>) or ConfigureWebHostDefaults(IHostBuilder, Action<IWebHostBuilder>).

| Improve this Doc View Source

UseConsensusProtocolHandler(IApplicationBuilder)

Setup Raft protocol handler as middleware for the specified application.

Declaration
public static IApplicationBuilder UseConsensusProtocolHandler(this IApplicationBuilder builder)
Parameters
Type Name Description
IApplicationBuilder builder

The application builder.

Returns
Type Description
IApplicationBuilder

The configured application builder.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX