packagegatingimport("net"ds"github.com/ipfs/go-datastore""github.com/libp2p/go-libp2p/core/connmgr""github.com/libp2p/go-libp2p/core/peer""github.com/libp2p/go-libp2p/p2p/net/conngater")//go:generate mockery --name BlockingConnectionGater --output mocks/ --with-expecter=truetypeBlockingConnectionGaterinterface{connmgr.ConnectionGater// BlockPeer adds a peer to the set of blocked peers.// Note: active connections to the peer are not automatically closed.BlockPeer(ppeer.ID)errorUnblockPeer(ppeer.ID)errorListBlockedPeers()[]peer.ID// BlockAddr adds an IP address to the set of blocked addresses.// Note: active connections to the IP address are not automatically closed.BlockAddr(ipnet.IP)errorUnblockAddr(ipnet.IP)errorListBlockedAddrs()[]net.IP// BlockSubnet adds an IP subnet to the set of blocked addresses.// Note: active connections to the IP subnet are not automatically closed.BlockSubnet(ipnet*net.IPNet)errorUnblockSubnet(ipnet*net.IPNet)errorListBlockedSubnets()[]*net.IPNet}funcNewBlockingConnectionGater(storeds.Batching)(BlockingConnectionGater,error){returnconngater.NewBasicConnectionGater(store)}