Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

feat: enable custom formats for server/client DAG (put|get) operations #3309

Closed
wants to merge 7 commits into from

Conversation

simonovic86
Copy link
Contributor

  • add customizable codecs in ipfs-http-client for DAG get
  • add customizable codecs in ipfs-http-server for DAG put

@achingbrain
Copy link
Member

CI is failing, could you please take a look?

@simonovic86
Copy link
Contributor Author

simonovic86 commented Sep 30, 2020

@achingbrain I've been working on the older branch and didn't merge all the changes. It should be fine now.

* @param {object} [opts.ipld.formats] - IPLD custom formats
* @return {Promise<HttpApi>}
*/
async start (opts = {}) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How are the opts passed into daemon start? If I run jsipfs daemon it's not going to pass anything into the start function, so there's no way to set these.

It would be helpful to have a test showing how passing the formats is intended to work, it's not clear to me right now, other than directly using the http server and client.

The updates themselves look good but the usage isn't clear.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can't do this through the CLI as it stands, instead you'd create a wrapper that starts a daemon with the required IPLD options.

I've added an example of how to do this in #3347

@achingbrain
Copy link
Member

I've tidied up the conflicts and added tests and an example over at #3347 - let's pull this over the line there.

@simonovic86
Copy link
Contributor Author

@achingbrain that's awesome! ty!

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.

3 participants