packageifaceimport("time""context"ma"gx/ipfs/QmWWQ2Txc2c6tqjsBpzg5Ar652cHPGNsQQp2SejkNmkUMb/go-multiaddr"peer"gx/ipfs/QmZoWKhxUmZ2seW4BzX6fJkNR8hh9PsGModr7q171yq2SS/go-libp2p-peer")// PeerInfo contains information about a peertypePeerInfointerface{// ID returns PeerIDID()peer.ID// Address returns the multiaddress via which we are connected with the peerAddress()ma.Multiaddr// Latency returns last known round trip time to the peerLatency()time.Duration// Streams returns list of streams established with the peer// TODO: should this return multicodecs?Streams()[]string}// SwarmAPI specifies the interface to libp2p swarmtypeSwarmAPIinterface{// Connect to a given addressConnect(context.Context,ma.Multiaddr)error// Disconnect from a given addressDisconnect(context.Context,ma.Multiaddr)error// Peers returns the list of peers we are connected toPeers(context.Context)([]PeerInfo,error)}