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

Allow stopping reading at the end of the circular buffer #9

Merged
merged 2 commits into from
Aug 1, 2023

Conversation

euank
Copy link
Owner

@euank euank commented Jul 25, 2023

This requires putting the fd into nonblocking mode, but keeping it outside of the epoll runtime stuff.

As such, it's implemented as a separate codepath to contain the hackiness.

This is a breaking change, so v3

I also dropped some tests that are tricky to implement since mocking /dev/kmsg semantics in go is a bit annoying.

I also updated Parse to take a channel as an input and not spin off its own goroutine. This gives a better api, and most notably better error handling.

@euank euank force-pushed the pr/allow-nofollow branch 3 times, most recently from d4cbacb to 4d73d57 Compare August 1, 2023 14:49
This requires putting the fd into nonblocking mode, but keeping it
outside of the epoll runtime stuff.

As such, it's implemented as a separate codepath to contain the
hackiness.

This is a breaking change, so v3
The parse api should have had the caller give a channel from the
beginning I think.
Copy link
Owner Author

@euank euank left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self-reviewing, this lgtm.

@euank euank merged commit b1b9c58 into master Aug 1, 2023
1 check passed
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