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

delayed: implement io.Closer and export datastore type. #108

Merged
merged 2 commits into from
Dec 27, 2018

Conversation

Stebalien
Copy link
Member

No description provided.

@ghost ghost assigned Stebalien Dec 26, 2018
@ghost ghost added the status/in-progress In progress label Dec 26, 2018
Copy link

@schomatis schomatis left a comment

Choose a reason for hiding this comment

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

LGTM


// Close closes the inner datastore (if it implements the io.Closer interface).
func (dds *Delayed) Close() error {
if closer, ok := dds.ds.(io.Closer); ok {

Choose a reason for hiding this comment

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

So, if I understand correctly, this will be forward compatible with a Close method that D is not implementing at the moment, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is for the underlying datastore, not the delay. It allows us to wrap e.g. badger without hiding the Close method.

@Stebalien Stebalien merged commit eec3759 into master Dec 27, 2018
@ghost ghost removed the status/in-progress In progress label Dec 27, 2018
@Stebalien Stebalien deleted the cleanup/export-delaystore branch December 27, 2018 00:52
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