)// WireTap provides methods to access all messages sent and received by Bitswap.// This interface can be used to implement various statistics (this is original intent).typeWireTapinterface{MessageReceived(peer.ID,bsmsg.BitSwapMessage)MessageSent(peer.ID,bsmsg.BitSwapMessage)}// Configures Bitswap to use given wiretap.funcEnableWireTap(tapWireTap)Option{returnfunc(bs*Bitswap){bs.wiretap=tap}}// Configures Bitswap not to use any wiretap.funcDisableWireTap()Option{returnfunc(bs*Bitswap){bs.wiretap=nil}}