Skip to content
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
feat/take-fetcher-config
Apr 21, 2021
Merged

Take fetcher config as parameter to resolver#38
hannahhoward merged 1 commit intofeat/ipld-in-ipfsfrom
feat/take-fetcher-config

Conversation

@hannahhoward
Copy link
Contributor

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.

@hannahhoward hannahhoward merged commit 096517c into feat/ipld-in-ipfs Apr 21, 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]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants