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

Make Prepare a method of a Provider #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

IamTheFij
Copy link
Contributor

The event perparation is opinioned and suitable only for the HTTP Provider. Another provider that would use a different format (eg. Loki) would require deserializing the JSON back to []api.Event and then serializing it again.

This will avoid that step and allow greater flexibily for providers to handle their own serialization.

Alternatives considered:

  • Unexporting Pepare and refactoring Push([]byte) to Push([]api.Event).

The event perparation is opinioned and suitable only for the HTTP
Provider. Another provider that would use a different format (eg. Loki)
would require deserializing the JSON back to `[]api.Event` and then
serializing it again.

This will avoid that step and allow greater flexibily for providers to
handle their own serialization.

Alternatives considered:
* Unexporting `Pepare` and refactoring `Push([]byte)` to `Push([]api.Event)`.
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.

1 participant