1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-30 18:13:54 +08:00

Merge pull request #3605 from ipfs/feat/none-routing

add in option to use nil-routing
This commit is contained in:
Jeromy Johnson
2017-01-18 00:05:13 -08:00
committed by GitHub

View File

@ -45,6 +45,7 @@ const (
routingOptionSupernodeKwd = "supernode"
routingOptionDHTClientKwd = "dhtclient"
routingOptionDHTKwd = "dht"
routingOptionNoneKwd = "none"
unencryptTransportKwd = "disable-transport-encryption"
unrestrictedApiAccessKwd = "unrestricted-api"
writableKwd = "writable"
@ -331,6 +332,8 @@ func daemonFunc(req cmds.Request, res cmds.Response) {
ncfg.Routing = core.DHTClientOption
case routingOptionDHTKwd:
ncfg.Routing = core.DHTOption
case routingOptionNoneKwd:
ncfg.Routing = core.NilRouterOption
default:
res.SetError(fmt.Errorf("unrecognized routing option: %s", routingOption), cmds.ErrNormal)
return