Skip to content
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

Support custom dispatchers for event streams #117

Merged
merged 17 commits into from
Jan 16, 2024
Merged

Conversation

peterbroadhurst
Copy link
Contributor

@peterbroadhurst peterbroadhurst commented Jan 2, 2024

I have a use of this library, where I need to handle events within the Go code directly - using constructs specific to the Microservice.

Unlike the Webhook and WebSocket implementations, these cannot be made generic in the common library. So instead, I propose adding this extension point to the common library to allow me to extended it with my implementation.

This PR also proposes some quality of life improvements, particularly around name-or-UUID semantics, and upsert.

  • Also proposes a small extra utility that supports generics for returning {items:[]} style responses
  • Also fixes 64a7088 without which the eventsreams function breaks on restart when you have un-set batchTimeout, with:
    FF00234: Value '0' is invalid for field 'batchTimeout'

Signed-off-by: Peter Broadhurst <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Jan 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (fa739e9) 99.98% compared to head (128dec8) 99.98%.
Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #117   +/-   ##
=======================================
  Coverage   99.98%   99.98%           
=======================================
  Files          78       78           
  Lines        6370     6416   +46     
=======================================
+ Hits         6369     6415   +46     
  Misses          1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Peter Broadhurst <[email protected]>
Signed-off-by: Peter Broadhurst <[email protected]>
Signed-off-by: Peter Broadhurst <[email protected]>
Signed-off-by: Peter Broadhurst <[email protected]>
Signed-off-by: Peter Broadhurst <[email protected]>
Signed-off-by: Peter Broadhurst <[email protected]>
Signed-off-by: Peter Broadhurst <[email protected]>
Signed-off-by: Peter Broadhurst <[email protected]>
pkg/eventstreams/config.go Show resolved Hide resolved
Signed-off-by: Peter Broadhurst <[email protected]>
@peterbroadhurst peterbroadhurst merged commit ba21054 into main Jan 16, 2024
2 checks passed
@peterbroadhurst peterbroadhurst deleted the custom-dispatchers branch January 16, 2024 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants