interface.go 361 Bytes
Newer Older
1 2 3 4 5
package testnet

import (
	"github.com/libp2p/go-libp2p-core/peer"
	tnet "github.com/libp2p/go-libp2p-testing/net"
6 7

	gsnet "github.com/ipfs/go-graphsync/network"
8 9 10 11 12 13 14 15
)

// Network is an interface for generating graphsync network interfaces
// based on a test network.
type Network interface {
	Adapter(tnet.Identity) gsnet.GraphSyncNetwork
	HasPeer(peer.ID) bool
}