Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Helps with svix/monorepo-private#8654 Depends on client lib updates (not yet available). I'd call this "quick and dirty" but it was actually a bit of a hefty lift to pull together. It is however fairly dirty. The want is to be able to pull messages from `/events` and feed them into a receiver output. The flow we'd see with `SenderInput` paired with `ReceiverOutput` is what we want, but the existing typing didn't allow for this. Refactors were needed to: - lift out the parts from the HTTP server that run payloads through transformations then forward to an output. - update config to account for a new type of receiver: a "poller". - new traits/types for the poller to differentiate it from the standard webhook receiver (to ensure we don't accidentally pass one through and try to bind it to a URL). - Lots of "connective tissue" in the form of converters between config values and concrete ones that can actually do things. Some of the "connective tissue" exists purely to mimic bits and pieces that existed for either the other receivers or senders (remember, this case is odd in that it's similar to both). Refactorings aside, the poller itself boasts an exponential backoff for both error cases (either from `/events` or from the output) as well as for the case where the `/events` iterator is "done." This diff comes with a promise that we will (soon) give these additions another look at clean up the stuff that doesn't make sense or feels redundant.
- Loading branch information