This repository was archived by the owner on Jun 20, 2023. It is now read-only.
Take fetcher config as parameter to resolver#38
Merged
hannahhoward merged 1 commit intofeat/ipld-in-ipfsfrom Apr 21, 2021
Merged
Take fetcher config as parameter to resolver#38hannahhoward merged 1 commit intofeat/ipld-in-ipfsfrom
hannahhoward merged 1 commit intofeat/ipld-in-ipfsfrom
Conversation
willscott
approved these changes
Apr 20, 2021
hannahhoward
added a commit
that referenced
this pull request
Jul 22, 2021
hannahhoward
added a commit
that referenced
this pull request
Aug 12, 2021
* Use go-fetcher, unixfsnode, and ipld-prime to resolve paths. (#34) * first pass * Update resolver/resolver.go Co-authored-by: Eric Myhre <[email protected]> * update dependencies to tagged versions * correctly handles nested nodes within blocks * return link from resolve path so we can fetch container block * return expected NoSuchLink error * more accurate errors * feat(resolver): remove resolve once remove ResolveOnce as it's no longer used and is just confusing Co-authored-by: acruikshank <[email protected]> Co-authored-by: Eric Myhre <[email protected]> Co-authored-by: hannahhoward <[email protected]> * fix(update to tagged branches): update to tagged branches and use node reifier * fix(deps): update go-unixfsnode * fix(deps): update to latest go fetcher (#37) * feat(resolver): take fetcher config as parameter (#38) * fix(deps): switch to tagged go-fetcher * fix(resolver): removed ipldcbor dependency * fix(mod): remove unneeded deps * fix(resolver): correct comments * test(resolver): add test verifying ErrNoLink functionality * fix(lint): fix lint errors resolve go vet and staticcheck issues. note we had to ignore two lines that use deprecated behavior, but which replacing could have unintended effects * fix(resolver): LookupBySegment to handle list indexes as well as map fields (#42) * fix(resolver): LookupBySegment to handle list indexes as well as map fields * Add test for /mixed/path/segment/types/1/2/3 * feat(resolver): address more PR comments * style(tests): add clarification * style(lint): fix lint errors, redo test fix * fix(deps): update deps to tagged version Co-authored-by: Alex Cruikshank <[email protected]> Co-authored-by: acruikshank <[email protected]> Co-authored-by: Eric Myhre <[email protected]> Co-authored-by: Rod Vagg <[email protected]>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Goals
Avoid constructing a fetcher config in the resolver
Implementation
Take Fetcher Factory (generalized interface for FetcherConfig) as parameter to the resolver. This removes dependence on the BlockService, which also means not having to reconfigure the FetcherConfig every time you make a resolver. Also, it potentially means we can support Fetchers that are not dependent on the BlockService.