Skip to content

Commit

Permalink
Merge pull request #3605 from ipfs/feat/none-routing
Browse files Browse the repository at this point in the history
add in option to use nil-routing
  • Loading branch information
whyrusleeping authored Jan 18, 2017
2 parents 75cce80 + 0cbbdae commit a90c508
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/ipfs/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const (
routingOptionSupernodeKwd = "supernode"
routingOptionDHTClientKwd = "dhtclient"
routingOptionDHTKwd = "dht"
routingOptionNoneKwd = "none"
unencryptTransportKwd = "disable-transport-encryption"
unrestrictedApiAccessKwd = "unrestricted-api"
writableKwd = "writable"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a90c508

Please sign in to comment.