-
Notifications
You must be signed in to change notification settings - Fork 16
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
Support multiple metadata transport protocols #198
Conversation
@gammazero I think this PR would make #196 redundant if it only contains multi metadata support |
Codecov Report
@@ Coverage Diff @@
## main #198 +/- ##
==========================================
+ Coverage 38.17% 39.15% +0.97%
==========================================
Files 49 53 +4
Lines 3526 3678 +152
==========================================
+ Hits 1346 1440 +94
- Misses 1929 1973 +44
- Partials 251 265 +14
|
7990a6f
to
cbbadeb
Compare
cbbadeb
to
c0c8376
Compare
Introduce the `Transport` type to capture information about multiple transport protocols within a single metadata. Re implement `Metadata` type to accommodate: * multiple transport protocols * enforce they are sorted by their ID * backward compatibility with existing metadata format * deserialization of existing formats gracefully. Add metadata conversion to keep code compiling until this PR is merged: - ipni/storetheindex#250 Fixes: #188
c0c8376
to
bf3ee40
Compare
Remove the `v0.Metadata` type in favour of a simpler `[]byte` in preparation for moving all metadata types entirely to index provider. From this point onwards, metadata is treated as an opaque payload by the indexer. Users should use index-provider library to decode it instead. Relates to: - ipni/index-provider#198
Marking as draft until this is merged: ipni/storetheindex#260 |
Remove the `v0.Metadata` type in favour of a simpler `[]byte` in preparation for moving all metadata types entirely to index provider. From this point onwards, metadata is treated as an opaque payload by the indexer. Users should use index-provider library to decode it instead. Relates to: - ipni/index-provider#198
a263fb5
to
e36b55b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! See comments.
Usage: "Specify retrieval protocol ID", | ||
Required: true, | ||
}, | ||
metadataFlag, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine for now, but we may want to have a graphsync
and a bitswap
flag to allow the user to specify the metadata protocol and contents.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Captured: #199
Depend on head of PR that removes `Metadata` type in storetheindex so that we can remove all workarounds: - ipni/storetheindex#260
e36b55b
to
ead079b
Compare
This reverts commit 537eb37 now that the index-provider is upgraded. See: - ipni/index-provider#198
This reverts commit 537eb37 now that the index-provider is upgraded. See: - ipni/index-provider#198
Introduce the
Transport
type to capture information about multipletransport protocols within a single metadata.
Re implement
Metadata
type to accommodate:Add metadata conversion to keep code compiling until this PR is merged:- ipni/storetheindex#250The PR now depends on the head of sti
main
now that this PR is merged.Fixes: #188