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

In NewService, optionally set opts.RootDatastore to a persistent data store #92

Merged
merged 2 commits into from
Aug 1, 2023

Conversation

jefft0
Copy link
Contributor

@jefft0 jefft0 commented Aug 1, 2023

This pull request has two commits. The first commit cleans up Opts.applyPushDefaults: It doesn't need to call applyDefaultsGetDatastore again, and it doesn't return an error. Also make applyDefaultsGetDatastore return an error, in preparation for the next commit. This commit does not change any functionality.

The second commit updates Opts.applyDefaultsGetDatastore (called by NewService) to optionally set opts.RootDatastore to a persistent data store at opts.DatastoreDir . This uses the same code for a Badger database that we move from NewPersistentServiceClient (and which is now simpler).

@jefft0 jefft0 requested a review from D4ryl00 August 1, 2023 13:05
@jefft0 jefft0 changed the title Feat/opts.root datastore default In NewService, optionally set opts.RootDatastore to a persistent data store Aug 1, 2023
service.go Outdated Show resolved Hide resolved
service.go Show resolved Hide resolved
…pplyDefaultsGetDatastore. Return error from applyDefaultsGetDatastore.

Signed-off-by: Jeff Thompson <jeff@thefirst.org>
…s.DatastoreDir. Use this in NewServiceClient.

Signed-off-by: Jeff Thompson <jeff@thefirst.org>
@jefft0 jefft0 force-pushed the feat/opts.RootDatastore-default branch from 7482de4 to 73658cf Compare August 1, 2023 15:20
Copy link
Collaborator

@D4ryl00 D4ryl00 left a comment

Choose a reason for hiding this comment

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

LGTM!

@jefft0 jefft0 merged commit 0588c1a into berty:main Aug 1, 2023
12 checks passed
@jefft0 jefft0 deleted the feat/opts.RootDatastore-default branch August 1, 2023 15:31
@github-actions
Copy link

github-actions bot commented Aug 1, 2023

🎉 This PR is included in version 1.14.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants