-
Notifications
You must be signed in to change notification settings - Fork 963
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
IPFS: use IPFS Gateway API #5600
base: master
Are you sure you want to change the base?
Conversation
60c8b2d
to
465e4fc
Compare
465e4fc
to
b2f492d
Compare
Introduces a new IPFS gateway client, refactoring the existing RPC API client to reuse the new code. Also introduces some new types and concepts to make working with IPFS easier.
Integrates the new IPFS types and clients into the existing codebase, replacing the old types and client.
b2f492d
to
4c7d7eb
Compare
Box::new(self) | ||
} | ||
|
||
async fn send_test_request(&self) -> anyhow::Result<()> { |
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.
Not sure what this is trying to achieve, is this only used for tests or is this a check for something specific? If it's only used for tests, could it be marked with cfg(test) ?
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.
Test requests are used to check which type of API a server address supports (RPC or Gateway) in order to initialize the appropriate client.
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.
LGTM overall, I think this should be tested in the integration cluster before merging
This PR implements a new IPFS client that connects and sends requests to the IPFS Gateway. The existing IPFS RPC API client has been refactored to reuse new code.
The
--ipfs
CLI argument accepts both IPFS Gateway URLs and RPC API URLs, and the appropriate client is automatically detected and created.Closes #5573
Todos