2using System.Collections.Generic;
4using System.Threading.Tasks;
34 public async ValueTask
HandleEvent(
EventType eventType, IEnumerable<string?> parameters,
bool deploymentPipeline, CancellationToken cancellationToken)
36 ArgumentNullException.ThrowIfNull(parameters);
39 throw new InvalidOperationException(
"EventConsumer used without watchdog set!");
52 ArgumentNullException.ThrowIfNull(
watchdog);
53 var oldWatchdog = Interlocked.CompareExchange(ref this.watchdog,
watchdog,
null);
54 if (oldWatchdog !=
null)
55 throw new InvalidOperationException(
"watchdog already set!");
IWatchdog? watchdog
The IWatchdog for the EventConsumer.
readonly IConfiguration configuration
The IConfiguration for the EventConsumer.
async ValueTask HandleEvent(EventType eventType, IEnumerable< string?> parameters, bool deploymentPipeline, CancellationToken cancellationToken)
Handle a given eventType . A ValueTask representing the running operation.
void SetWatchdog(IWatchdog watchdog)
Set the watchdog for the EventConsumer.
EventConsumer(IConfiguration configuration)
Initializes a new instance of the EventConsumer class.
Consumes EventTypes and takes the appropriate actions.
ValueTask HandleEvent(EventType eventType, IEnumerable< string?> parameters, bool deploymentPipeline, CancellationToken cancellationToken)
Handle a given eventType .
For managing the Configuration directory.
Runs and monitors the twin server controllers.
EventType
Types of events. Mirror in tgs.dm. Prefer last listed name for script.