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

Add flag-driven event publisher #4784

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

evankanderson
Copy link
Member

Summary

Adds an event publisher which selects between two event publishing channels based on flag configuration.

Change Type

Mark the type of change your PR introduces:

  • Bug fix (resolves an issue without affecting existing features)
  • Feature (adds new functionality without breaking changes)
  • Breaking change (may impact existing functionalities or require documentation updates)
  • Documentation (updates or additions to documentation)
  • Refactoring or test improvements (no bug fixes or new functionality)

Testing

Manual testing between go-channel and nats, then wrote a unit test.

Note: I used two go channels for the tests, because the setup for those is easier. I could switch one to NATS if desired.

Review Checklist:

  • Reviewed my own code for quality and clarity.
  • Added comments to complex or tricky code sections.
  • Updated any affected documentation.
  • Included tests that validate the fix or feature.
  • Checked that related changes are merged.

@coveralls
Copy link

coveralls commented Oct 21, 2024

Pull Request Test Coverage Report for Build 11450469659

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 76 of 99 (76.77%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 54.812%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/service/service.go 0 3 0.0%
internal/events/flagged_driver.go 67 87 77.01%
Totals Coverage Status
Change from base Build 11441554036: 0.1%
Covered Lines: 14995
Relevant Lines: 27357

💛 - Coveralls

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