Skip to content

Commit

Permalink
Tutorials [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
eaba committed Aug 9, 2022
1 parent 369d049 commit f4827b9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
19 changes: 7 additions & 12 deletions Tutorials/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ class Program
private static PulsarClient _client;
static async Task Main(string[] args)
{

var url = "pulsar://localhost:6650";
await StartContainer();
var url = "pulsar://127.0.0.1:6650";
//pulsar client settings builder
Console.WriteLine("Welcome!!");
Console.WriteLine("Select 0(none-tls) 1(tls) 2(OAuth)");
var selections = new List<string> { "0", "1", "2" };
Console.WriteLine("Select 0(none-tls) 1(tls)");
var selections = new List<string> { "0", "1" };
var selection = Console.ReadLine();
var selected = selections.Contains(selection);
while (!selected)
Expand All @@ -48,15 +48,10 @@ static async Task Main(string[] args)
selection = Console.ReadLine();
selected = selection != "0";
}
if (selection.Equals("2"))
{
await RunOauth();
return;
}
await StartContainer();
if (selection.Equals("1"))
url = "pulsar+ssl://127.0.0.1:6651";


var clientConfig = new PulsarClientConfigBuilder()
.ServiceUrl(url);

Expand All @@ -69,7 +64,7 @@ static async Task Main(string[] args)
Console.WriteLine("Please, time to execute some command, which do you want?");
var cmd = Console.ReadLine();

//clientConfig.EnableTransaction(true);
clientConfig.EnableTransaction(true);

//pulsar actor system
var pulsarSystem = await PulsarSystem.GetInstanceAsync(clientConfig);
Expand All @@ -80,7 +75,7 @@ static async Task Main(string[] args)
while (cmd.ToLower() != "exit")
{
await HandleCmd(cmd, pulsarClient);
Console.WriteLine(".....waiting");
Console.WriteLine(".....waiting");
cmd = Console.ReadLine();
}
Console.ReadKey();
Expand Down
2 changes: 1 addition & 1 deletion Tutorials/Tutorials.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="DotNet.Testcontainers" Version="1.6.0" />
<PackageReference Include="Spectre.Console" Version="0.44.1-preview.0.17" />
<PackageReference Include="Testcontainers" Version="2.1.0" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit f4827b9

Please sign in to comment.