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 ReadBatch() API #16

Merged
merged 1 commit into from
Jan 17, 2022
Merged

Add ReadBatch() API #16

merged 1 commit into from
Jan 17, 2022

Conversation

embano1
Copy link
Owner

@embano1 embano1 commented Jan 17, 2022

Adds ReadBatch() to Log to support use cases with batching, e.g. HTTP/REST APIs.
Instead of returning []Record this API uses the io.Reader pattern of providing (and reusing) a slice to reduce pressure on the GC.

Closes: #5
Signed-off-by: Michael Gasch [email protected]

@codecov-commenter
Copy link

codecov-commenter commented Jan 17, 2022

Codecov Report

Merging #16 (7520232) into main (2217871) will increase coverage by 0.82%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #16      +/-   ##
==========================================
+ Coverage   88.88%   89.71%   +0.82%     
==========================================
  Files           4        4              
  Lines         162      175      +13     
==========================================
+ Hits          144      157      +13     
  Misses         11       11              
  Partials        7        7              
Impacted Files Coverage Δ
memlog.go 84.90% <100.00%> (+2.10%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2217871...7520232. Read the comment docs.

Closes: #5
Signed-off-by: Michael Gasch <[email protected]>
@embano1 embano1 changed the title WIP Add ReadBatch() API Jan 17, 2022
@embano1 embano1 merged commit 2217ad1 into main Jan 17, 2022
@embano1 embano1 deleted the issue-5 branch January 17, 2022 14:50
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.

Idea: memlog.ReadBatch() method
2 participants