Conversation
License: MIT Signed-off-by: Lars Gierth <larsg@systemli.org>
|
Whoops, totally forgot updating the go tests. otherwise still happy about review :) |
24aa7ab to
0545005
Compare
|
I am pretty sure that sharness t0236-cli-api-dns-resolve.sh is failing on Jenkins because of a |
License: MIT Signed-off-by: Lars Gierth <larsg@systemli.org>
0545005 to
47c78e2
Compare
|
This one is ready for review |
License: MIT Signed-off-by: keks <keks@cryptoscope.co>
| } | ||
| } | ||
|
|
||
| if commands { |
There was a problem hiding this comment.
Why don't you do this inside the loop (at line 64, where you currently set commands to true)?
|
|
||
| nextOut := new(cmds.Command) | ||
| *nextOut = *nextIn | ||
| nextOut.Subcommands = map[string]*cmds.Command{} |
There was a problem hiding this comment.
Hm, so you unconditionally create a new subcommand mal. That confuses me. Because if you have e.g. both dag/get and dag/resolve in allowed, you would overwrite dag and delete dag/get when adding dag/resolve.
Checking the tests now to see why this passes.
There was a problem hiding this comment.
I updated the tests and now they fail. Could you fix this?
|
It will be much simpler to back delegated routing by a modified branch of go-ipfs, so I'm closing this PR.
|
|
@lgierth did this ever land in some other PR? was there anything more to the story? We were trying to use |
|
We never did. |
This is for Delegated Routing in js-libp2p (ipfs/js-ipfs#1459 & libp2p/js-libp2p#120) and supersedes #4595.
It lets us configure the commands available through :8080/api/v0/ -- for delegated routing, we would then e.g. expose
swarm/connect,refs,dht/findprovs, anddht/findpeer.By default,
Gateway.APICommandsis empty, which means go-ipfs will use the default :8080 commands.