Skip to content

Commit

Permalink
fix: client options
Browse files Browse the repository at this point in the history
  • Loading branch information
yongenaelf committed Oct 21, 2024
1 parent 4811394 commit eb4426f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/PlaygroundClient/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@
using Microsoft.AspNetCore.Mvc;
using GrainInterfaces;
using Microsoft.Extensions.Logging;
using Orleans.Configuration;

var builder = WebApplication.CreateBuilder(args);
builder.Host
.UseOrleansClient(client =>
.UseOrleansClient((context, clientBuilder) =>
{
client.Configure<ClusterOptions>(options =>
clientBuilder.Configure<ClusterOptions>(options =>
{
options.ClusterId = Environment.GetEnvironmentVariable("ORLEANS_CLUSTER_ID") ?? "default";
options.ServiceId = Environment.GetEnvironmentVariable("ORLEANS_SERVICE_ID") ?? "default";
});

client.UseZooKeeperClustering(options =>
clientBuilder.UseZooKeeperClustering(options =>
{
// for development, start services using docker compose.
options.ConnectionString = Environment.GetEnvironmentVariable("ASPNETCORE_ZOOKEEPER_HOST") ?? "localhost:2181";
Expand Down

0 comments on commit eb4426f

Please sign in to comment.