Repository navigation
Refactors for Gateway Server - #642
Merged
Merged
Conversation
added 10 commits
January 24, 2015 01:32
@jbenet @whyrusleeping was the 1<<16 intentional? replaced the raw methods with wrappers.
corerepo package name provides sufficient context (even if renamed by caller)
now, eventlogger works wherever the fsrepo is used
Member
There was a problem hiding this comment.
im worried that the implementation of GarbageCollect and GarbageCollectAsync may drift. thoughts?
Contributor
Author
There was a problem hiding this comment.
The meat of the two operations is limited to 3 statements.
keychan, err := n.Blockstore.AllKeysChan(ctx)
if !n.Pinning.IsPinned(k) {
err := n.Blockstore.DeleteBlock(k)The rest is boilerplate async. It seems that sharing more code would make the synchronous version more complex and the asynchronous one less direct.
Member
|
LGTM RTM |
hacdias
pushed a commit
to ipfs/boxo
that referenced
this pull request
Jan 27, 2023
Refactors for Gateway Server This commit was moved from ipfs/kubo@316576a
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR is comprised of preparatory refactors for an upcoming IPFS gateway-server binary.
corehttpinterfacecorerepodirectoryfsrepo.BestKnownPath()method to handle order of precedence between the default FSRepo path and the path provided using the IPFS_PATH env variableblockstore.AllKeys(ctx)method and renames parameterized one toAllKeysRange(ctx, 0, 0)corerepo.GarbageCollectAsyncand adds a synchronous versionfsrepopackage so eventlogging works whereverfsrepo's are usedeventlogbegin output@jbenet @whyrusleeping