Example #1
0
        public async Task <IActionResult> Handle([FromRoute] string channel, [FromBody] AlertManagerWebhookUpdate update, CancellationToken cancellation = default)
        {
            var request = new AlertManagerUpdateRequest(channel, update);
            await _mediator.Send(request, cancellation);

            return(Ok());
        }
Example #2
0
 public SendAlertRequest(AlertsSubscription subscription, string text, ParseMode parseMode, AlertManagerWebhookUpdate alertManagerUpdate)
 {
     Subscription       = subscription;
     Text               = text;
     ParseMode          = parseMode;
     AlertManagerUpdate = alertManagerUpdate;
 }
Example #3
0
 public AlertManagerUpdateRequest(string channel, AlertManagerWebhookUpdate update)
 {
     Update  = update;
     Channel = channel;
 }