added two samples
This commit is contained in:
38
wolverine-nats/WolverineAndNats/AppHost/AppHost.cs
Normal file
38
wolverine-nats/WolverineAndNats/AppHost/AppHost.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
var builder = DistributedApplication.CreateBuilder(args);
|
||||
|
||||
var natsTransport = builder.AddNats("nats")
|
||||
.WithJetStream()
|
||||
.WithLifetime(ContainerLifetime.Persistent);
|
||||
|
||||
var pg = builder.AddPostgres("pg")
|
||||
.WithLifetime(ContainerLifetime.Persistent);
|
||||
|
||||
var dbOne = pg.AddDatabase("db-one");
|
||||
var dbTwo = pg.AddDatabase("db-two");
|
||||
|
||||
var apiOne = builder.AddProject<Projects.ApiOne>("one")
|
||||
.WithReference(dbOne)
|
||||
.WithReference(natsTransport)
|
||||
.WaitFor(natsTransport)
|
||||
.WaitFor(dbOne);
|
||||
|
||||
builder.AddProject<Projects.ApiTwo>("two")
|
||||
.WithReference(dbTwo)
|
||||
.WithReference(natsTransport)
|
||||
.WaitFor(natsTransport)
|
||||
.WaitFor(apiOne) // apiOne creates the "PEOPLE" stream
|
||||
.WaitFor(dbTwo);
|
||||
|
||||
builder.AddProject<Projects.PlainListener>("listener")
|
||||
.WithReplicas(2)
|
||||
.WithReference(natsTransport)
|
||||
.WaitFor(natsTransport)
|
||||
.WaitFor(apiOne); // apiOne creates the "PEOPLE" stream
|
||||
|
||||
builder.AddProject<Projects.LateComer>("late-comer")
|
||||
.WithExplicitStart()
|
||||
.WithReference(natsTransport)
|
||||
.WaitFor(natsTransport)
|
||||
.WaitFor(apiOne); // apiOne creates the "PEOPLE" stream
|
||||
|
||||
builder.Build().Run();
|
||||
23
wolverine-nats/WolverineAndNats/AppHost/AppHost.csproj
Normal file
23
wolverine-nats/WolverineAndNats/AppHost/AppHost.csproj
Normal file
@@ -0,0 +1,23 @@
|
||||
<Project Sdk="Aspire.AppHost.Sdk/13.1.0">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<UserSecretsId>3fd9a60b-40a2-4d52-bdae-fcb13dceb6d3</UserSecretsId>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Aspire.Hosting.Nats" Version="13.1.0" />
|
||||
<PackageReference Include="Aspire.Hosting.PostgreSQL" Version="13.1.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ApiOne\ApiOne.csproj" />
|
||||
<ProjectReference Include="..\ApiTwo\ApiTwo.csproj" />
|
||||
<ProjectReference Include="..\LateComer\LateComer.csproj" />
|
||||
<ProjectReference Include="..\PlainListener\PlainListener.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/launchsettings.json",
|
||||
"profiles": {
|
||||
"https": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": false,
|
||||
"applicationUrl": "https://localhost:5000",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development",
|
||||
"DOTNET_ENVIRONMENT": "Development",
|
||||
"ASPIRE_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:21090",
|
||||
"ASPIRE_DASHBOARD_MCP_ENDPOINT_URL": "https://localhost:23000",
|
||||
"ASPIRE_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22128"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
}
|
||||
}
|
||||
9
wolverine-nats/WolverineAndNats/AppHost/appsettings.json
Normal file
9
wolverine-nats/WolverineAndNats/AppHost/appsettings.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning",
|
||||
"Aspire.Hosting.Dcp": "Warning"
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/AppHost
Executable file
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/AppHost
Executable file
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"runtimeOptions": {
|
||||
"tfm": "net10.0",
|
||||
"frameworks": [
|
||||
{
|
||||
"name": "Microsoft.NETCore.App",
|
||||
"version": "10.0.0"
|
||||
},
|
||||
{
|
||||
"name": "Microsoft.AspNetCore.App",
|
||||
"version": "10.0.0"
|
||||
}
|
||||
],
|
||||
"configProperties": {
|
||||
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/Aspire.Hosting.dll
Executable file
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/Aspire.Hosting.dll
Executable file
Binary file not shown.
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/Fractions.dll
Executable file
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/Fractions.dll
Executable file
Binary file not shown.
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/Google.Protobuf.dll
Executable file
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/Google.Protobuf.dll
Executable file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/Grpc.Core.Api.dll
Executable file
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/Grpc.Core.Api.dll
Executable file
Binary file not shown.
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/Grpc.Net.Client.dll
Executable file
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/Grpc.Net.Client.dll
Executable file
Binary file not shown.
Binary file not shown.
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/Grpc.Net.Common.dll
Executable file
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/Grpc.Net.Common.dll
Executable file
Binary file not shown.
Binary file not shown.
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/HealthChecks.Uris.dll
Executable file
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/HealthChecks.Uris.dll
Executable file
Binary file not shown.
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/Humanizer.dll
Executable file
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/Humanizer.dll
Executable file
Binary file not shown.
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/Json.More.dll
Executable file
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/Json.More.dll
Executable file
Binary file not shown.
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/JsonPatch.Net.dll
Executable file
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/JsonPatch.Net.dll
Executable file
Binary file not shown.
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/JsonPointer.Net.dll
Executable file
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/JsonPointer.Net.dll
Executable file
Binary file not shown.
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/KubernetesClient.dll
Executable file
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/KubernetesClient.dll
Executable file
Binary file not shown.
Binary file not shown.
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/MessagePack.dll
Executable file
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/MessagePack.dll
Executable file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/NATS.Client.Core.dll
Executable file
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/NATS.Client.Core.dll
Executable file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/NATS.Net.dll
Executable file
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/NATS.Net.dll
Executable file
Binary file not shown.
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/Nerdbank.Streams.dll
Executable file
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/Nerdbank.Streams.dll
Executable file
Binary file not shown.
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/Newtonsoft.Json.dll
Executable file
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/Newtonsoft.Json.dll
Executable file
Binary file not shown.
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/Npgsql.dll
Executable file
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/Npgsql.dll
Executable file
Binary file not shown.
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/Polly.Core.dll
Executable file
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/Polly.Core.dll
Executable file
Binary file not shown.
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/Semver.dll
Executable file
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/Semver.dll
Executable file
Binary file not shown.
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/StreamJsonRpc.dll
Executable file
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/StreamJsonRpc.dll
Executable file
Binary file not shown.
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/System.IO.Hashing.dll
Executable file
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/System.IO.Hashing.dll
Executable file
Binary file not shown.
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/YamlDotNet.dll
Executable file
BIN
wolverine-nats/WolverineAndNats/AppHost/bin/Debug/net10.0/YamlDotNet.dll
Executable file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user