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

feat: add GetKeys to get event keys #527

Closed
wants to merge 1 commit into from
Closed

feat: add GetKeys to get event keys #527

wants to merge 1 commit into from

Conversation

julienrbrt
Copy link
Contributor

As far as I know, there is no way to get all the keys of a particular event.
This is handy (even though expensive), to use in hooks.

@julienrbrt
Copy link
Contributor Author

Gently pinging you @rs, this would greatly help us.

@rs
Copy link
Owner

rs commented Mar 29, 2023

This won’t work until event is “closed” (sent) and won’t work with bson encoding. I’m not for adding/maintaining this. Thanks for the suggestion.

@rs rs closed this Mar 29, 2023
@julienrbrt
Copy link
Contributor Author

julienrbrt commented Mar 29, 2023

This won’t work until event is “closed” (sent) and won’t work with bson encoding. I’m not for adding/maintaining this. Thanks for the suggestion.

This makes sense, thanks for your review! Would you know a solution for reaching the same goal?

@rs
Copy link
Owner

rs commented Mar 29, 2023

You can set an io.Writer wrapping your output writer that decodes JSON on each call the Write. It is guaranteed that each write will get a full event.

@julienrbrt julienrbrt deleted the get-keys branch March 29, 2023 12:42
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.

2 participants