refactor: remove Store
type param in Instance
#101
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Related to #72 and #13
Rationale for this change
We support various
ObjectStore
implements to be assembled in a recursive way. LikeCachedStore
->LocalStore
+RemoteStore
. The existing type param way that requires fully specifying a type would be hard to implement. For simplicity and feasibility, I change this type param to a trait object. A related discussion can be found at #72.The
CachedStore
has been implemented but the corresponding config is not added yet. This PR also provides a way to config a storage cache layer. Example config has been updated todocs/example.toml
What changes are included in this PR?
This PR contains two changes:
Store
type param inInstance
CachedStore
Maybe I need to separate it into two PRs
Are there any user-facing changes?
The config file has changed.
How does this change test
The refactor is tested by the compiler. New config is tested manually.