-
Notifications
You must be signed in to change notification settings - Fork 20
refactor outbound sender to allow for multiple modes of dispatch #614
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #614 +/- ##
==========================================
+ Coverage 53.89% 55.73% +1.83%
==========================================
Files 9 16 +7
Lines 1334 1830 +496
==========================================
+ Hits 719 1020 +301
- Misses 574 749 +175
- Partials 41 61 +20
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
dispatcher.go
Outdated
| Send(urls *ring.Ring, secret, acceptType string, msg *wrp.Message) | ||
| } | ||
|
|
||
| func DispatcherFactory(webhook bool, obs *CaduceusOutboundSender) Dispatcher { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is removed
outboundSender_test.go
Outdated
| } | ||
|
|
||
| obs.(*CaduceusOutboundSender).queueOverflow() | ||
| obs.(*WebhookOutboundSender).obs.dispatcher.QueueOverflow() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will eventually also return StreamOutboundSender
also added kinesis and batch packages, but they aren't used yet, please ignore them for reviewing.
OutboundSender contains the common functionality for WebhookOutboundSender and eventually StreamOutboundSender. t
However, OutboundSender has the Update function that takes ancla.Webhook so it doesn't really fit that well with StreamOutboundSender. So, that is a code smell that probably needs to be addressed. That said, we might want to actually update stream senders from Argus so we don't have to reboot caduceus. Initially this will be a predefined set of streams and we need to manually add them to headwaters, so it can't be entirely automated. But would be nice to not have to redeploy caduceus.