public async Task listenOnChangeSQS(ListenOnChange listen, CancellationToken ct)
        {
            var request = new SendMessageRequest();

            request.QueueUrl    = ListenOnChangeQueueUrl;
            request.MessageBody = JsonSerializer.Serialize(listen);
            await _sqs.SendMessageAsync(request, ct);
        }
 public override Task ListenOnChange(ListenOnChange listen, CancellationToken ct = default)
 {
     if (!string.IsNullOrEmpty(ListenOnChangeFunction))
     {
         return(listenOnChangeLambda(listen, ct));
     }
     return(listenOnChangeSQS(listen, ct));
 }
        public async Task listenOnChangeLambda(ListenOnChange listen, CancellationToken ct)
        {
            var request = new InvokeRequest();

            request.InvocationType = InvocationType.Event;
            request.FunctionName   = ListenOnChangeFunction;
            request.Payload        = JsonSerializer.Serialize(listen);
            await _lambda.InvokeAsync(request, ct);
        }
 public abstract Task ListenOnChange(ListenOnChange listen, CancellationToken ct = default);