Skip to content

Commit

Permalink
Added Petabridge.Cmd (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaronontheweb authored Nov 14, 2024
1 parent 6c9a092 commit e4b2927
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 2 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
<PackageVersion Include="Grpc.Tools" Version="2.67.0" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.10" />
<PackageVersion Include="MudBlazor" Version="6.20.0" />
<PackageVersion Include="Petabridge.Cmd.Cluster" Version="1.4.3" />
<PackageVersion Include="Petabridge.Cmd.Cluster.Sharding" Version="1.4.3" />
</ItemGroup>
<!-- ASP.NET Package Versions -->
<ItemGroup>
Expand Down
2 changes: 2 additions & 0 deletions src/DrawTogether/DrawTogether.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" />
<PackageReference Include="OpenTelemetry.Instrumentation.Http" />
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" />
<PackageReference Include="Petabridge.Cmd.Cluster" />
<PackageReference Include="Petabridge.Cmd.Cluster.Sharding" />
</ItemGroup>

<ItemGroup>
Expand Down
13 changes: 10 additions & 3 deletions src/DrawTogether/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
using DrawTogether.Email;
using Microsoft.AspNetCore.ResponseCompression;
using MudBlazor.Services;
using Petabridge.Cmd.Cluster;
using Petabridge.Cmd.Cluster.Sharding;
using Petabridge.Cmd.Host;

// get ASP.NET Environment
var env = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") ?? "Development";
Expand Down Expand Up @@ -58,9 +61,13 @@
builder.Services.Configure<RouteOptions>(options => options.LowercaseUrls = true);
builder.Services.ConfigureAkka(builder.Configuration,
(configurationBuilder, provider) =>
{

});
{
configurationBuilder.AddPetabridgeCmd(cmd =>
{
cmd.RegisterCommandPalette(ClusterCommands.Instance);
cmd.RegisterCommandPalette(ClusterShardingCommands.Instance);
});
});

builder.Services.AddDrawTogetherOtel();

Expand Down

0 comments on commit e4b2927

Please sign in to comment.