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

feat(gcr/c) add support for multiple servers

This commit is contained in:
Brian Tiger Chow
2015-01-28 05:20:20 -08:00
parent 73b544c932
commit d80e9aba7a
2 changed files with 39 additions and 12 deletions

View File

@ -70,7 +70,11 @@ func GrandCentralClient(remotes ...peer.PeerInfo) core.RoutingOption {
// TODO right now, I think this has a hidden dependency on the
// bootstrap peers provided to the core.Node. Careful...
proxy := gcproxy.Standard(node.PeerHost, remotes[0].ID) // TODO support more than one
var ids []peer.ID
for _, info := range remotes {
ids = append(ids, info.ID)
}
proxy := gcproxy.Standard(node.PeerHost, ids)
return grandcentral.NewClient(proxy, node.Peerstore, node.Identity)
}
}