-
-
Notifications
You must be signed in to change notification settings - Fork 289
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add PulsarService and functionality to PulsarBuilder
A new file, PulsarService.cs, has been added, with a struct named PulsarService that allows the creation of different Pulsar services. Changes have also been made to PulsarBuilder.cs, mainly to incorporate the use of PulsarService. Rather than using a constant value, `WithAuthentication()` and `WithFunctionsWorker(bool functionsWorkerEnabled = true)` now use elements from the PulsarService struct. Wait strategy has been updated to better account for various enabled services.
- Loading branch information
David Jensen
committed
Apr 12, 2024
1 parent
ed1ed66
commit bdcef9d
Showing
2 changed files
with
61 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
namespace Testcontainers.Pulsar; | ||
|
||
internal readonly struct PulsarService | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="PulsarService" /> struct. | ||
/// </summary> | ||
/// <param name="identifier">The identifier.</param> | ||
private PulsarService(string identifier) | ||
{ | ||
Identifier = identifier; | ||
} | ||
|
||
/// <summary> | ||
/// Gets the Auth. | ||
/// </summary> | ||
public static readonly PulsarService Authentication = new PulsarService("auth"); | ||
|
||
/// <summary> | ||
/// Gets the Function worker service. | ||
/// </summary> | ||
public static readonly PulsarService FunctionWorker = new PulsarService("funk"); | ||
|
||
/// <summary> | ||
/// Gets the identifier. | ||
/// </summary> | ||
public string Identifier { get; } | ||
} | ||
|
||
|