Commit 07427f7f authored by yangxiaodong's avatar yangxiaodong

node discovery

parent c63dc682
......@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Text;
using DotNetCore.CAP.Dashboard;
using DotNetCore.CAP.NodeDiscovery;
namespace DotNetCore.CAP
{
......@@ -19,6 +20,8 @@ namespace DotNetCore.CAP
/// </summary>
public string AppPath { get; set; }
public NodeConfiguration Discovery { get; set; }
public IEnumerable<IDashboardAuthorizationFilter> Authorization { get; set; }
/// <summary>
......
......@@ -5,6 +5,7 @@ using System.Text;
namespace DotNetCore.CAP
{
using DotNetCore.CAP.Dashboard;
using DotNetCore.CAP.NodeDiscovery;
using Microsoft.Extensions.DependencyInjection;
internal sealed class DashboardOptionsExtension : ICapOptionsExtension
......@@ -20,8 +21,10 @@ namespace DotNetCore.CAP
{
var dashboardOptions = new DashboardOptions();
_options?.Invoke(dashboardOptions);
services.AddSingleton(dashboardOptions);
services.AddSingleton(dashboardOptions);
services.AddSingleton(DashboardRoutes.Routes);
services.AddSingleton<IDiscoveryProviderFactory, DiscoveryProviderFactory>();
services.AddSingleton<IProcessingServer, ConsulProcessingNodeServer>();
}
}
}
......
......@@ -44,6 +44,7 @@
<EmbeddedResource Include="Dashboard\Content\js\rickshaw.min.js" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Consul" Version="0.7.2.3" />
<PackageReference Include="Microsoft.AspNetCore.Hosting.Abstractions" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="2.0.0" />
......@@ -126,6 +127,9 @@
<Compile Update="Dashboard\Pages\SubscriberPage.generated.cs">
<DependentUpon>SubscriberPage.cshtml</DependentUpon>
</Compile>
<Compile Update="Dashboard\Pages\NodePage*.cs">
<DependentUpon>NodePage.cshtml</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Dashboard\Content\resx\Strings.resx">
......@@ -139,4 +143,7 @@
<Generator>RazorGenerator</Generator>
</None>
</ItemGroup>
<ItemGroup>
<Folder Include="Dashboard\Consul\" />
</ItemGroup>
</Project>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment