Commit 04e4abd8 authored by Jeromy's avatar Jeromy

routing: rework interfaces to make separation easier

License: MIT
Signed-off-by: default avatarJeromy <why@ipfs.io>
parent 3d7d133e
......@@ -20,7 +20,7 @@ import (
var log = logging.Logger("bitswap_network")
// NewFromIpfsHost returns a BitSwapNetwork supported by underlying IPFS host
func NewFromIpfsHost(host host.Host, r routing.IpfsRouting) BitSwapNetwork {
func NewFromIpfsHost(host host.Host, r routing.ContentRouting) BitSwapNetwork {
bitswapNetwork := impl{
host: host,
routing: r,
......@@ -36,7 +36,7 @@ func NewFromIpfsHost(host host.Host, r routing.IpfsRouting) BitSwapNetwork {
// NetMessage objects, into the bitswap network interface.
type impl struct {
host host.Host
routing routing.IpfsRouting
routing routing.ContentRouting
// inbound messages from the network are forwarded to the receiver
receiver Receiver
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment