Skip to content

Commit

Permalink
modified reaction provider
Browse files Browse the repository at this point in the history
  • Loading branch information
ruokun-niu committed Jan 7, 2025
1 parent fe53b6a commit 3c4d4b2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
6 changes: 6 additions & 0 deletions cli/service/resources/default-reaction-providers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ spec:
- "CloudEvents"
- "EventGrid"
default: "CloudEvents"
format:
type: string
enum:
- "packed"
- "unpacked"
default: "packed"
required:
- eventGridUri
---
Expand Down
4 changes: 0 additions & 4 deletions reactions/azure/eventgrid-reaction/Services/ChangeHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ public ChangeHandler(EventGridPublisherClient publisherClient,IConfiguration con
_formatter = formatter;
_logger = logger;
_eventGridSchema = config.GetValue<string>("eventGridSchema").ToLower();
if (_eventGridSchema != "eventgrid" && _eventGridSchema != "cloudevents")
{
throw new ArgumentException("Invalid event grid schema. Supported schemas are 'EventGrid' and 'CloudEvents'.");
}
}

public async Task HandleChange(ChangeEvent evt, object? queryConfig)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ public ControlSignalHandler(EventGridPublisherClient publisherClient, IConfigura
_format = Enum.Parse<OutputFormat>(config.GetValue("format", "packed") ?? "packed", true);
_logger = logger;
_eventGridSchema = config.GetValue<string>("eventGridSchema").ToLower();
if (_eventGridSchema != "eventgrid" && _eventGridSchema != "cloudevents")
{
throw new ArgumentException("Invalid event grid schema. Supported schemas are 'EventGrid' and 'CloudEvents'.");
}
Console.WriteLine("schema: " + _eventGridSchema);
}

public async Task HandleControlSignal(ControlEvent evt, object? queryConfig)
Expand Down

0 comments on commit 3c4d4b2

Please sign in to comment.