-
Notifications
You must be signed in to change notification settings - Fork 25
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
Reader API #5
Comments
Hi @marceloboeira, I would like to help on this issue, and would like to ensure I am not in the wrong direction. Following is my understanding, for this issue, you would like to implement one method |
@cuichenli pub fn read_at(&self, position, number_of_records) -> Result<Vec<Record>, io::Error> max_number_of_records -> how many entries from the index/log should be read (max). If there are less than the specified number, return them... And the something like: pub fn read(&self, position) -> Result<Record, io::Error> {
self.read_at(position, 1)?.[0]
} You can start small, open the PR and we discuss further details. |
Hi, @marceloboeira I have made a simple draft pr #14 , hope I am not too wrong on it. I am new to Rust so I may have made a lot of mistakes as well, please kindly forgive. |
I had a quick look, seems great! I’ll double check later today and merge it 👌🏻 |
@marceloboeira What should we do next for this issue? By now we have implemented the |
I think we're good for now! 😄 |
Right now, you need to know exactly the points you want to read in order to be able to read from a log, otherwise you get an error.
Considering that the
commit_log
API is pretty much a crate, we should handle all its public methods as public interface, so, it is essential that we improve that by having a wrapper "response" to improve the UX of the reader side…Acceptance criteria
At the end of this task, we should be able to read messages through:
This might envolve creating the
Record
struct, if it comes to that, let’s make sure we change Writing/Reading from the commit log to support that.The text was updated successfully, but these errors were encountered: