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(accessor): exposing ShardAccessor.data through exported method #1

Merged
merged 2 commits into from
Nov 24, 2022

Conversation

distractedm1nd
Copy link
Collaborator

Ref: celestiaorg/celestia-node#1101

@Wondertan Is this what you had in mind? Or should it be a ReadCloser, or the mount.Reader?

@distractedm1nd distractedm1nd changed the title feat(accessor): exposing ShardAccessor.data feat(accessor): exposing ShardAccessor.data through exported method Sep 20, 2022
@Wondertan
Copy link
Member

Wondertan commented Sep 23, 2022

@distractedm1nd, we just need to ensure that all the resources that are allocated for the Reader are cleaned up once we have done the reading.

Note that we return the Reader and ShardAccessor.Close is not accessible from there, while it must be closed once the reader is done with the job.

Another solution here would be to make ShardAccesor itself to implement Reader and it already returns Close

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