Documentation ¶
Index ¶
- type BlockingConnectionGater
- func (_m *BlockingConnectionGater) BlockAddr(ip net.IP) error
- func (_m *BlockingConnectionGater) BlockPeer(p peer.ID) error
- func (_m *BlockingConnectionGater) BlockSubnet(ipnet *net.IPNet) error
- func (_m *BlockingConnectionGater) EXPECT() *BlockingConnectionGater_Expecter
- func (_m *BlockingConnectionGater) InterceptAccept(_a0 network.ConnMultiaddrs) bool
- func (_m *BlockingConnectionGater) InterceptAddrDial(_a0 peer.ID, _a1 multiaddr.Multiaddr) bool
- func (_m *BlockingConnectionGater) InterceptPeerDial(p peer.ID) bool
- func (_m *BlockingConnectionGater) InterceptSecured(_a0 network.Direction, _a1 peer.ID, _a2 network.ConnMultiaddrs) bool
- func (_m *BlockingConnectionGater) InterceptUpgraded(_a0 network.Conn) (bool, control.DisconnectReason)
- func (_m *BlockingConnectionGater) ListBlockedAddrs() []net.IP
- func (_m *BlockingConnectionGater) ListBlockedPeers() []peer.ID
- func (_m *BlockingConnectionGater) ListBlockedSubnets() []*net.IPNet
- func (_m *BlockingConnectionGater) UnblockAddr(ip net.IP) error
- func (_m *BlockingConnectionGater) UnblockPeer(p peer.ID) error
- func (_m *BlockingConnectionGater) UnblockSubnet(ipnet *net.IPNet) error
- type BlockingConnectionGater_BlockAddr_Call
- func (_c *BlockingConnectionGater_BlockAddr_Call) Return(_a0 error) *BlockingConnectionGater_BlockAddr_Call
- func (_c *BlockingConnectionGater_BlockAddr_Call) Run(run func(ip net.IP)) *BlockingConnectionGater_BlockAddr_Call
- func (_c *BlockingConnectionGater_BlockAddr_Call) RunAndReturn(run func(net.IP) error) *BlockingConnectionGater_BlockAddr_Call
- type BlockingConnectionGater_BlockPeer_Call
- func (_c *BlockingConnectionGater_BlockPeer_Call) Return(_a0 error) *BlockingConnectionGater_BlockPeer_Call
- func (_c *BlockingConnectionGater_BlockPeer_Call) Run(run func(p peer.ID)) *BlockingConnectionGater_BlockPeer_Call
- func (_c *BlockingConnectionGater_BlockPeer_Call) RunAndReturn(run func(peer.ID) error) *BlockingConnectionGater_BlockPeer_Call
- type BlockingConnectionGater_BlockSubnet_Call
- func (_c *BlockingConnectionGater_BlockSubnet_Call) Return(_a0 error) *BlockingConnectionGater_BlockSubnet_Call
- func (_c *BlockingConnectionGater_BlockSubnet_Call) Run(run func(ipnet *net.IPNet)) *BlockingConnectionGater_BlockSubnet_Call
- func (_c *BlockingConnectionGater_BlockSubnet_Call) RunAndReturn(run func(*net.IPNet) error) *BlockingConnectionGater_BlockSubnet_Call
- type BlockingConnectionGater_Expecter
- func (_e *BlockingConnectionGater_Expecter) BlockAddr(ip interface{}) *BlockingConnectionGater_BlockAddr_Call
- func (_e *BlockingConnectionGater_Expecter) BlockPeer(p interface{}) *BlockingConnectionGater_BlockPeer_Call
- func (_e *BlockingConnectionGater_Expecter) BlockSubnet(ipnet interface{}) *BlockingConnectionGater_BlockSubnet_Call
- func (_e *BlockingConnectionGater_Expecter) InterceptAccept(_a0 interface{}) *BlockingConnectionGater_InterceptAccept_Call
- func (_e *BlockingConnectionGater_Expecter) InterceptAddrDial(_a0 interface{}, _a1 interface{}) *BlockingConnectionGater_InterceptAddrDial_Call
- func (_e *BlockingConnectionGater_Expecter) InterceptPeerDial(p interface{}) *BlockingConnectionGater_InterceptPeerDial_Call
- func (_e *BlockingConnectionGater_Expecter) InterceptSecured(_a0 interface{}, _a1 interface{}, _a2 interface{}) *BlockingConnectionGater_InterceptSecured_Call
- func (_e *BlockingConnectionGater_Expecter) InterceptUpgraded(_a0 interface{}) *BlockingConnectionGater_InterceptUpgraded_Call
- func (_e *BlockingConnectionGater_Expecter) ListBlockedAddrs() *BlockingConnectionGater_ListBlockedAddrs_Call
- func (_e *BlockingConnectionGater_Expecter) ListBlockedPeers() *BlockingConnectionGater_ListBlockedPeers_Call
- func (_e *BlockingConnectionGater_Expecter) ListBlockedSubnets() *BlockingConnectionGater_ListBlockedSubnets_Call
- func (_e *BlockingConnectionGater_Expecter) UnblockAddr(ip interface{}) *BlockingConnectionGater_UnblockAddr_Call
- func (_e *BlockingConnectionGater_Expecter) UnblockPeer(p interface{}) *BlockingConnectionGater_UnblockPeer_Call
- func (_e *BlockingConnectionGater_Expecter) UnblockSubnet(ipnet interface{}) *BlockingConnectionGater_UnblockSubnet_Call
- type BlockingConnectionGater_InterceptAccept_Call
- func (_c *BlockingConnectionGater_InterceptAccept_Call) Return(allow bool) *BlockingConnectionGater_InterceptAccept_Call
- func (_c *BlockingConnectionGater_InterceptAccept_Call) Run(run func(_a0 network.ConnMultiaddrs)) *BlockingConnectionGater_InterceptAccept_Call
- func (_c *BlockingConnectionGater_InterceptAccept_Call) RunAndReturn(run func(network.ConnMultiaddrs) bool) *BlockingConnectionGater_InterceptAccept_Call
- type BlockingConnectionGater_InterceptAddrDial_Call
- func (_c *BlockingConnectionGater_InterceptAddrDial_Call) Return(allow bool) *BlockingConnectionGater_InterceptAddrDial_Call
- func (_c *BlockingConnectionGater_InterceptAddrDial_Call) Run(run func(_a0 peer.ID, _a1 multiaddr.Multiaddr)) *BlockingConnectionGater_InterceptAddrDial_Call
- func (_c *BlockingConnectionGater_InterceptAddrDial_Call) RunAndReturn(run func(peer.ID, multiaddr.Multiaddr) bool) *BlockingConnectionGater_InterceptAddrDial_Call
- type BlockingConnectionGater_InterceptPeerDial_Call
- func (_c *BlockingConnectionGater_InterceptPeerDial_Call) Return(allow bool) *BlockingConnectionGater_InterceptPeerDial_Call
- func (_c *BlockingConnectionGater_InterceptPeerDial_Call) Run(run func(p peer.ID)) *BlockingConnectionGater_InterceptPeerDial_Call
- func (_c *BlockingConnectionGater_InterceptPeerDial_Call) RunAndReturn(run func(peer.ID) bool) *BlockingConnectionGater_InterceptPeerDial_Call
- type BlockingConnectionGater_InterceptSecured_Call
- func (_c *BlockingConnectionGater_InterceptSecured_Call) Return(allow bool) *BlockingConnectionGater_InterceptSecured_Call
- func (_c *BlockingConnectionGater_InterceptSecured_Call) Run(run func(_a0 network.Direction, _a1 peer.ID, _a2 network.ConnMultiaddrs)) *BlockingConnectionGater_InterceptSecured_Call
- func (_c *BlockingConnectionGater_InterceptSecured_Call) RunAndReturn(run func(network.Direction, peer.ID, network.ConnMultiaddrs) bool) *BlockingConnectionGater_InterceptSecured_Call
- type BlockingConnectionGater_InterceptUpgraded_Call
- func (_c *BlockingConnectionGater_InterceptUpgraded_Call) Return(allow bool, reason control.DisconnectReason) *BlockingConnectionGater_InterceptUpgraded_Call
- func (_c *BlockingConnectionGater_InterceptUpgraded_Call) Run(run func(_a0 network.Conn)) *BlockingConnectionGater_InterceptUpgraded_Call
- func (_c *BlockingConnectionGater_InterceptUpgraded_Call) RunAndReturn(run func(network.Conn) (bool, control.DisconnectReason)) *BlockingConnectionGater_InterceptUpgraded_Call
- type BlockingConnectionGater_ListBlockedAddrs_Call
- func (_c *BlockingConnectionGater_ListBlockedAddrs_Call) Return(_a0 []net.IP) *BlockingConnectionGater_ListBlockedAddrs_Call
- func (_c *BlockingConnectionGater_ListBlockedAddrs_Call) Run(run func()) *BlockingConnectionGater_ListBlockedAddrs_Call
- func (_c *BlockingConnectionGater_ListBlockedAddrs_Call) RunAndReturn(run func() []net.IP) *BlockingConnectionGater_ListBlockedAddrs_Call
- type BlockingConnectionGater_ListBlockedPeers_Call
- func (_c *BlockingConnectionGater_ListBlockedPeers_Call) Return(_a0 []peer.ID) *BlockingConnectionGater_ListBlockedPeers_Call
- func (_c *BlockingConnectionGater_ListBlockedPeers_Call) Run(run func()) *BlockingConnectionGater_ListBlockedPeers_Call
- func (_c *BlockingConnectionGater_ListBlockedPeers_Call) RunAndReturn(run func() []peer.ID) *BlockingConnectionGater_ListBlockedPeers_Call
- type BlockingConnectionGater_ListBlockedSubnets_Call
- func (_c *BlockingConnectionGater_ListBlockedSubnets_Call) Return(_a0 []*net.IPNet) *BlockingConnectionGater_ListBlockedSubnets_Call
- func (_c *BlockingConnectionGater_ListBlockedSubnets_Call) Run(run func()) *BlockingConnectionGater_ListBlockedSubnets_Call
- func (_c *BlockingConnectionGater_ListBlockedSubnets_Call) RunAndReturn(run func() []*net.IPNet) *BlockingConnectionGater_ListBlockedSubnets_Call
- type BlockingConnectionGater_UnblockAddr_Call
- func (_c *BlockingConnectionGater_UnblockAddr_Call) Return(_a0 error) *BlockingConnectionGater_UnblockAddr_Call
- func (_c *BlockingConnectionGater_UnblockAddr_Call) Run(run func(ip net.IP)) *BlockingConnectionGater_UnblockAddr_Call
- func (_c *BlockingConnectionGater_UnblockAddr_Call) RunAndReturn(run func(net.IP) error) *BlockingConnectionGater_UnblockAddr_Call
- type BlockingConnectionGater_UnblockPeer_Call
- func (_c *BlockingConnectionGater_UnblockPeer_Call) Return(_a0 error) *BlockingConnectionGater_UnblockPeer_Call
- func (_c *BlockingConnectionGater_UnblockPeer_Call) Run(run func(p peer.ID)) *BlockingConnectionGater_UnblockPeer_Call
- func (_c *BlockingConnectionGater_UnblockPeer_Call) RunAndReturn(run func(peer.ID) error) *BlockingConnectionGater_UnblockPeer_Call
- type BlockingConnectionGater_UnblockSubnet_Call
- func (_c *BlockingConnectionGater_UnblockSubnet_Call) Return(_a0 error) *BlockingConnectionGater_UnblockSubnet_Call
- func (_c *BlockingConnectionGater_UnblockSubnet_Call) Run(run func(ipnet *net.IPNet)) *BlockingConnectionGater_UnblockSubnet_Call
- func (_c *BlockingConnectionGater_UnblockSubnet_Call) RunAndReturn(run func(*net.IPNet) error) *BlockingConnectionGater_UnblockSubnet_Call
- type ExpiryStore
- func (_m *ExpiryStore) EXPECT() *ExpiryStore_Expecter
- func (_m *ExpiryStore) GetIPBanExpiration(ip net.IP) (time.Time, error)
- func (_m *ExpiryStore) GetPeerBanExpiration(id peer.ID) (time.Time, error)
- func (_m *ExpiryStore) SetIPBanExpiration(ip net.IP, expiry time.Time) error
- func (_m *ExpiryStore) SetPeerBanExpiration(id peer.ID, expiry time.Time) error
- type ExpiryStore_Expecter
- func (_e *ExpiryStore_Expecter) GetIPBanExpiration(ip interface{}) *ExpiryStore_GetIPBanExpiration_Call
- func (_e *ExpiryStore_Expecter) GetPeerBanExpiration(id interface{}) *ExpiryStore_GetPeerBanExpiration_Call
- func (_e *ExpiryStore_Expecter) SetIPBanExpiration(ip interface{}, expiry interface{}) *ExpiryStore_SetIPBanExpiration_Call
- func (_e *ExpiryStore_Expecter) SetPeerBanExpiration(id interface{}, expiry interface{}) *ExpiryStore_SetPeerBanExpiration_Call
- type ExpiryStore_GetIPBanExpiration_Call
- func (_c *ExpiryStore_GetIPBanExpiration_Call) Return(_a0 time.Time, _a1 error) *ExpiryStore_GetIPBanExpiration_Call
- func (_c *ExpiryStore_GetIPBanExpiration_Call) Run(run func(ip net.IP)) *ExpiryStore_GetIPBanExpiration_Call
- func (_c *ExpiryStore_GetIPBanExpiration_Call) RunAndReturn(run func(net.IP) (time.Time, error)) *ExpiryStore_GetIPBanExpiration_Call
- type ExpiryStore_GetPeerBanExpiration_Call
- func (_c *ExpiryStore_GetPeerBanExpiration_Call) Return(_a0 time.Time, _a1 error) *ExpiryStore_GetPeerBanExpiration_Call
- func (_c *ExpiryStore_GetPeerBanExpiration_Call) Run(run func(id peer.ID)) *ExpiryStore_GetPeerBanExpiration_Call
- func (_c *ExpiryStore_GetPeerBanExpiration_Call) RunAndReturn(run func(peer.ID) (time.Time, error)) *ExpiryStore_GetPeerBanExpiration_Call
- type ExpiryStore_SetIPBanExpiration_Call
- func (_c *ExpiryStore_SetIPBanExpiration_Call) Return(_a0 error) *ExpiryStore_SetIPBanExpiration_Call
- func (_c *ExpiryStore_SetIPBanExpiration_Call) Run(run func(ip net.IP, expiry time.Time)) *ExpiryStore_SetIPBanExpiration_Call
- func (_c *ExpiryStore_SetIPBanExpiration_Call) RunAndReturn(run func(net.IP, time.Time) error) *ExpiryStore_SetIPBanExpiration_Call
- type ExpiryStore_SetPeerBanExpiration_Call
- func (_c *ExpiryStore_SetPeerBanExpiration_Call) Return(_a0 error) *ExpiryStore_SetPeerBanExpiration_Call
- func (_c *ExpiryStore_SetPeerBanExpiration_Call) Run(run func(id peer.ID, expiry time.Time)) *ExpiryStore_SetPeerBanExpiration_Call
- func (_c *ExpiryStore_SetPeerBanExpiration_Call) RunAndReturn(run func(peer.ID, time.Time) error) *ExpiryStore_SetPeerBanExpiration_Call
- type Scores
- type Scores_Expecter
- type Scores_GetPeerScore_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockingConnectionGater ¶
BlockingConnectionGater is an autogenerated mock type for the BlockingConnectionGater type
func NewBlockingConnectionGater ¶
func NewBlockingConnectionGater(t mockConstructorTestingTNewBlockingConnectionGater) *BlockingConnectionGater
NewBlockingConnectionGater creates a new instance of BlockingConnectionGater. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*BlockingConnectionGater) BlockAddr ¶
func (_m *BlockingConnectionGater) BlockAddr(ip net.IP) error
BlockAddr provides a mock function with given fields: ip
func (*BlockingConnectionGater) BlockPeer ¶
func (_m *BlockingConnectionGater) BlockPeer(p peer.ID) error
BlockPeer provides a mock function with given fields: p
func (*BlockingConnectionGater) BlockSubnet ¶
func (_m *BlockingConnectionGater) BlockSubnet(ipnet *net.IPNet) error
BlockSubnet provides a mock function with given fields: ipnet
func (*BlockingConnectionGater) EXPECT ¶
func (_m *BlockingConnectionGater) EXPECT() *BlockingConnectionGater_Expecter
func (*BlockingConnectionGater) InterceptAccept ¶
func (_m *BlockingConnectionGater) InterceptAccept(_a0 network.ConnMultiaddrs) bool
InterceptAccept provides a mock function with given fields: _a0
func (*BlockingConnectionGater) InterceptAddrDial ¶
InterceptAddrDial provides a mock function with given fields: _a0, _a1
func (*BlockingConnectionGater) InterceptPeerDial ¶
func (_m *BlockingConnectionGater) InterceptPeerDial(p peer.ID) bool
InterceptPeerDial provides a mock function with given fields: p
func (*BlockingConnectionGater) InterceptSecured ¶
func (_m *BlockingConnectionGater) InterceptSecured(_a0 network.Direction, _a1 peer.ID, _a2 network.ConnMultiaddrs) bool
InterceptSecured provides a mock function with given fields: _a0, _a1, _a2
func (*BlockingConnectionGater) InterceptUpgraded ¶
func (_m *BlockingConnectionGater) InterceptUpgraded(_a0 network.Conn) (bool, control.DisconnectReason)
InterceptUpgraded provides a mock function with given fields: _a0
func (*BlockingConnectionGater) ListBlockedAddrs ¶
func (_m *BlockingConnectionGater) ListBlockedAddrs() []net.IP
ListBlockedAddrs provides a mock function with given fields:
func (*BlockingConnectionGater) ListBlockedPeers ¶
func (_m *BlockingConnectionGater) ListBlockedPeers() []peer.ID
ListBlockedPeers provides a mock function with given fields:
func (*BlockingConnectionGater) ListBlockedSubnets ¶
func (_m *BlockingConnectionGater) ListBlockedSubnets() []*net.IPNet
ListBlockedSubnets provides a mock function with given fields:
func (*BlockingConnectionGater) UnblockAddr ¶
func (_m *BlockingConnectionGater) UnblockAddr(ip net.IP) error
UnblockAddr provides a mock function with given fields: ip
func (*BlockingConnectionGater) UnblockPeer ¶
func (_m *BlockingConnectionGater) UnblockPeer(p peer.ID) error
UnblockPeer provides a mock function with given fields: p
func (*BlockingConnectionGater) UnblockSubnet ¶
func (_m *BlockingConnectionGater) UnblockSubnet(ipnet *net.IPNet) error
UnblockSubnet provides a mock function with given fields: ipnet
type BlockingConnectionGater_BlockAddr_Call ¶
BlockingConnectionGater_BlockAddr_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockAddr'
func (*BlockingConnectionGater_BlockAddr_Call) Return ¶
func (_c *BlockingConnectionGater_BlockAddr_Call) Return(_a0 error) *BlockingConnectionGater_BlockAddr_Call
func (*BlockingConnectionGater_BlockAddr_Call) Run ¶
func (_c *BlockingConnectionGater_BlockAddr_Call) Run(run func(ip net.IP)) *BlockingConnectionGater_BlockAddr_Call
func (*BlockingConnectionGater_BlockAddr_Call) RunAndReturn ¶
func (_c *BlockingConnectionGater_BlockAddr_Call) RunAndReturn(run func(net.IP) error) *BlockingConnectionGater_BlockAddr_Call
type BlockingConnectionGater_BlockPeer_Call ¶
BlockingConnectionGater_BlockPeer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockPeer'
func (*BlockingConnectionGater_BlockPeer_Call) Return ¶
func (_c *BlockingConnectionGater_BlockPeer_Call) Return(_a0 error) *BlockingConnectionGater_BlockPeer_Call
func (*BlockingConnectionGater_BlockPeer_Call) Run ¶
func (_c *BlockingConnectionGater_BlockPeer_Call) Run(run func(p peer.ID)) *BlockingConnectionGater_BlockPeer_Call
func (*BlockingConnectionGater_BlockPeer_Call) RunAndReturn ¶
func (_c *BlockingConnectionGater_BlockPeer_Call) RunAndReturn(run func(peer.ID) error) *BlockingConnectionGater_BlockPeer_Call
type BlockingConnectionGater_BlockSubnet_Call ¶
BlockingConnectionGater_BlockSubnet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BlockSubnet'
func (*BlockingConnectionGater_BlockSubnet_Call) Return ¶
func (_c *BlockingConnectionGater_BlockSubnet_Call) Return(_a0 error) *BlockingConnectionGater_BlockSubnet_Call
func (*BlockingConnectionGater_BlockSubnet_Call) Run ¶
func (_c *BlockingConnectionGater_BlockSubnet_Call) Run(run func(ipnet *net.IPNet)) *BlockingConnectionGater_BlockSubnet_Call
func (*BlockingConnectionGater_BlockSubnet_Call) RunAndReturn ¶
func (_c *BlockingConnectionGater_BlockSubnet_Call) RunAndReturn(run func(*net.IPNet) error) *BlockingConnectionGater_BlockSubnet_Call
type BlockingConnectionGater_Expecter ¶
type BlockingConnectionGater_Expecter struct {
// contains filtered or unexported fields
}
func (*BlockingConnectionGater_Expecter) BlockAddr ¶
func (_e *BlockingConnectionGater_Expecter) BlockAddr(ip interface{}) *BlockingConnectionGater_BlockAddr_Call
BlockAddr is a helper method to define mock.On call
- ip net.IP
func (*BlockingConnectionGater_Expecter) BlockPeer ¶
func (_e *BlockingConnectionGater_Expecter) BlockPeer(p interface{}) *BlockingConnectionGater_BlockPeer_Call
BlockPeer is a helper method to define mock.On call
- p peer.ID
func (*BlockingConnectionGater_Expecter) BlockSubnet ¶
func (_e *BlockingConnectionGater_Expecter) BlockSubnet(ipnet interface{}) *BlockingConnectionGater_BlockSubnet_Call
BlockSubnet is a helper method to define mock.On call
- ipnet *net.IPNet
func (*BlockingConnectionGater_Expecter) InterceptAccept ¶
func (_e *BlockingConnectionGater_Expecter) InterceptAccept(_a0 interface{}) *BlockingConnectionGater_InterceptAccept_Call
InterceptAccept is a helper method to define mock.On call
- _a0 network.ConnMultiaddrs
func (*BlockingConnectionGater_Expecter) InterceptAddrDial ¶
func (_e *BlockingConnectionGater_Expecter) InterceptAddrDial(_a0 interface{}, _a1 interface{}) *BlockingConnectionGater_InterceptAddrDial_Call
InterceptAddrDial is a helper method to define mock.On call
- _a0 peer.ID
- _a1 multiaddr.Multiaddr
func (*BlockingConnectionGater_Expecter) InterceptPeerDial ¶
func (_e *BlockingConnectionGater_Expecter) InterceptPeerDial(p interface{}) *BlockingConnectionGater_InterceptPeerDial_Call
InterceptPeerDial is a helper method to define mock.On call
- p peer.ID
func (*BlockingConnectionGater_Expecter) InterceptSecured ¶
func (_e *BlockingConnectionGater_Expecter) InterceptSecured(_a0 interface{}, _a1 interface{}, _a2 interface{}) *BlockingConnectionGater_InterceptSecured_Call
InterceptSecured is a helper method to define mock.On call
- _a0 network.Direction
- _a1 peer.ID
- _a2 network.ConnMultiaddrs
func (*BlockingConnectionGater_Expecter) InterceptUpgraded ¶
func (_e *BlockingConnectionGater_Expecter) InterceptUpgraded(_a0 interface{}) *BlockingConnectionGater_InterceptUpgraded_Call
InterceptUpgraded is a helper method to define mock.On call
- _a0 network.Conn
func (*BlockingConnectionGater_Expecter) ListBlockedAddrs ¶
func (_e *BlockingConnectionGater_Expecter) ListBlockedAddrs() *BlockingConnectionGater_ListBlockedAddrs_Call
ListBlockedAddrs is a helper method to define mock.On call
func (*BlockingConnectionGater_Expecter) ListBlockedPeers ¶
func (_e *BlockingConnectionGater_Expecter) ListBlockedPeers() *BlockingConnectionGater_ListBlockedPeers_Call
ListBlockedPeers is a helper method to define mock.On call
func (*BlockingConnectionGater_Expecter) ListBlockedSubnets ¶
func (_e *BlockingConnectionGater_Expecter) ListBlockedSubnets() *BlockingConnectionGater_ListBlockedSubnets_Call
ListBlockedSubnets is a helper method to define mock.On call
func (*BlockingConnectionGater_Expecter) UnblockAddr ¶
func (_e *BlockingConnectionGater_Expecter) UnblockAddr(ip interface{}) *BlockingConnectionGater_UnblockAddr_Call
UnblockAddr is a helper method to define mock.On call
- ip net.IP
func (*BlockingConnectionGater_Expecter) UnblockPeer ¶
func (_e *BlockingConnectionGater_Expecter) UnblockPeer(p interface{}) *BlockingConnectionGater_UnblockPeer_Call
UnblockPeer is a helper method to define mock.On call
- p peer.ID
func (*BlockingConnectionGater_Expecter) UnblockSubnet ¶
func (_e *BlockingConnectionGater_Expecter) UnblockSubnet(ipnet interface{}) *BlockingConnectionGater_UnblockSubnet_Call
UnblockSubnet is a helper method to define mock.On call
- ipnet *net.IPNet
type BlockingConnectionGater_InterceptAccept_Call ¶
BlockingConnectionGater_InterceptAccept_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InterceptAccept'
func (*BlockingConnectionGater_InterceptAccept_Call) Return ¶
func (_c *BlockingConnectionGater_InterceptAccept_Call) Return(allow bool) *BlockingConnectionGater_InterceptAccept_Call
func (*BlockingConnectionGater_InterceptAccept_Call) Run ¶
func (_c *BlockingConnectionGater_InterceptAccept_Call) Run(run func(_a0 network.ConnMultiaddrs)) *BlockingConnectionGater_InterceptAccept_Call
func (*BlockingConnectionGater_InterceptAccept_Call) RunAndReturn ¶
func (_c *BlockingConnectionGater_InterceptAccept_Call) RunAndReturn(run func(network.ConnMultiaddrs) bool) *BlockingConnectionGater_InterceptAccept_Call
type BlockingConnectionGater_InterceptAddrDial_Call ¶
BlockingConnectionGater_InterceptAddrDial_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InterceptAddrDial'
func (*BlockingConnectionGater_InterceptAddrDial_Call) Return ¶
func (_c *BlockingConnectionGater_InterceptAddrDial_Call) Return(allow bool) *BlockingConnectionGater_InterceptAddrDial_Call
func (*BlockingConnectionGater_InterceptAddrDial_Call) Run ¶
func (_c *BlockingConnectionGater_InterceptAddrDial_Call) Run(run func(_a0 peer.ID, _a1 multiaddr.Multiaddr)) *BlockingConnectionGater_InterceptAddrDial_Call
func (*BlockingConnectionGater_InterceptAddrDial_Call) RunAndReturn ¶
func (_c *BlockingConnectionGater_InterceptAddrDial_Call) RunAndReturn(run func(peer.ID, multiaddr.Multiaddr) bool) *BlockingConnectionGater_InterceptAddrDial_Call
type BlockingConnectionGater_InterceptPeerDial_Call ¶
BlockingConnectionGater_InterceptPeerDial_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InterceptPeerDial'
func (*BlockingConnectionGater_InterceptPeerDial_Call) Return ¶
func (_c *BlockingConnectionGater_InterceptPeerDial_Call) Return(allow bool) *BlockingConnectionGater_InterceptPeerDial_Call
func (*BlockingConnectionGater_InterceptPeerDial_Call) Run ¶
func (_c *BlockingConnectionGater_InterceptPeerDial_Call) Run(run func(p peer.ID)) *BlockingConnectionGater_InterceptPeerDial_Call
func (*BlockingConnectionGater_InterceptPeerDial_Call) RunAndReturn ¶
func (_c *BlockingConnectionGater_InterceptPeerDial_Call) RunAndReturn(run func(peer.ID) bool) *BlockingConnectionGater_InterceptPeerDial_Call
type BlockingConnectionGater_InterceptSecured_Call ¶
BlockingConnectionGater_InterceptSecured_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InterceptSecured'
func (*BlockingConnectionGater_InterceptSecured_Call) Return ¶
func (_c *BlockingConnectionGater_InterceptSecured_Call) Return(allow bool) *BlockingConnectionGater_InterceptSecured_Call
func (*BlockingConnectionGater_InterceptSecured_Call) Run ¶
func (_c *BlockingConnectionGater_InterceptSecured_Call) Run(run func(_a0 network.Direction, _a1 peer.ID, _a2 network.ConnMultiaddrs)) *BlockingConnectionGater_InterceptSecured_Call
func (*BlockingConnectionGater_InterceptSecured_Call) RunAndReturn ¶
func (_c *BlockingConnectionGater_InterceptSecured_Call) RunAndReturn(run func(network.Direction, peer.ID, network.ConnMultiaddrs) bool) *BlockingConnectionGater_InterceptSecured_Call
type BlockingConnectionGater_InterceptUpgraded_Call ¶
BlockingConnectionGater_InterceptUpgraded_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InterceptUpgraded'
func (*BlockingConnectionGater_InterceptUpgraded_Call) Return ¶
func (_c *BlockingConnectionGater_InterceptUpgraded_Call) Return(allow bool, reason control.DisconnectReason) *BlockingConnectionGater_InterceptUpgraded_Call
func (*BlockingConnectionGater_InterceptUpgraded_Call) Run ¶
func (_c *BlockingConnectionGater_InterceptUpgraded_Call) Run(run func(_a0 network.Conn)) *BlockingConnectionGater_InterceptUpgraded_Call
func (*BlockingConnectionGater_InterceptUpgraded_Call) RunAndReturn ¶
func (_c *BlockingConnectionGater_InterceptUpgraded_Call) RunAndReturn(run func(network.Conn) (bool, control.DisconnectReason)) *BlockingConnectionGater_InterceptUpgraded_Call
type BlockingConnectionGater_ListBlockedAddrs_Call ¶
BlockingConnectionGater_ListBlockedAddrs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListBlockedAddrs'
func (*BlockingConnectionGater_ListBlockedAddrs_Call) Return ¶
func (_c *BlockingConnectionGater_ListBlockedAddrs_Call) Return(_a0 []net.IP) *BlockingConnectionGater_ListBlockedAddrs_Call
func (*BlockingConnectionGater_ListBlockedAddrs_Call) Run ¶
func (_c *BlockingConnectionGater_ListBlockedAddrs_Call) Run(run func()) *BlockingConnectionGater_ListBlockedAddrs_Call
func (*BlockingConnectionGater_ListBlockedAddrs_Call) RunAndReturn ¶
func (_c *BlockingConnectionGater_ListBlockedAddrs_Call) RunAndReturn(run func() []net.IP) *BlockingConnectionGater_ListBlockedAddrs_Call
type BlockingConnectionGater_ListBlockedPeers_Call ¶
BlockingConnectionGater_ListBlockedPeers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListBlockedPeers'
func (*BlockingConnectionGater_ListBlockedPeers_Call) Return ¶
func (_c *BlockingConnectionGater_ListBlockedPeers_Call) Return(_a0 []peer.ID) *BlockingConnectionGater_ListBlockedPeers_Call
func (*BlockingConnectionGater_ListBlockedPeers_Call) Run ¶
func (_c *BlockingConnectionGater_ListBlockedPeers_Call) Run(run func()) *BlockingConnectionGater_ListBlockedPeers_Call
func (*BlockingConnectionGater_ListBlockedPeers_Call) RunAndReturn ¶
func (_c *BlockingConnectionGater_ListBlockedPeers_Call) RunAndReturn(run func() []peer.ID) *BlockingConnectionGater_ListBlockedPeers_Call
type BlockingConnectionGater_ListBlockedSubnets_Call ¶
BlockingConnectionGater_ListBlockedSubnets_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListBlockedSubnets'
func (*BlockingConnectionGater_ListBlockedSubnets_Call) Return ¶
func (_c *BlockingConnectionGater_ListBlockedSubnets_Call) Return(_a0 []*net.IPNet) *BlockingConnectionGater_ListBlockedSubnets_Call
func (*BlockingConnectionGater_ListBlockedSubnets_Call) Run ¶
func (_c *BlockingConnectionGater_ListBlockedSubnets_Call) Run(run func()) *BlockingConnectionGater_ListBlockedSubnets_Call
func (*BlockingConnectionGater_ListBlockedSubnets_Call) RunAndReturn ¶
func (_c *BlockingConnectionGater_ListBlockedSubnets_Call) RunAndReturn(run func() []*net.IPNet) *BlockingConnectionGater_ListBlockedSubnets_Call
type BlockingConnectionGater_UnblockAddr_Call ¶
BlockingConnectionGater_UnblockAddr_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnblockAddr'
func (*BlockingConnectionGater_UnblockAddr_Call) Return ¶
func (_c *BlockingConnectionGater_UnblockAddr_Call) Return(_a0 error) *BlockingConnectionGater_UnblockAddr_Call
func (*BlockingConnectionGater_UnblockAddr_Call) Run ¶
func (_c *BlockingConnectionGater_UnblockAddr_Call) Run(run func(ip net.IP)) *BlockingConnectionGater_UnblockAddr_Call
func (*BlockingConnectionGater_UnblockAddr_Call) RunAndReturn ¶
func (_c *BlockingConnectionGater_UnblockAddr_Call) RunAndReturn(run func(net.IP) error) *BlockingConnectionGater_UnblockAddr_Call
type BlockingConnectionGater_UnblockPeer_Call ¶
BlockingConnectionGater_UnblockPeer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnblockPeer'
func (*BlockingConnectionGater_UnblockPeer_Call) Return ¶
func (_c *BlockingConnectionGater_UnblockPeer_Call) Return(_a0 error) *BlockingConnectionGater_UnblockPeer_Call
func (*BlockingConnectionGater_UnblockPeer_Call) Run ¶
func (_c *BlockingConnectionGater_UnblockPeer_Call) Run(run func(p peer.ID)) *BlockingConnectionGater_UnblockPeer_Call
func (*BlockingConnectionGater_UnblockPeer_Call) RunAndReturn ¶
func (_c *BlockingConnectionGater_UnblockPeer_Call) RunAndReturn(run func(peer.ID) error) *BlockingConnectionGater_UnblockPeer_Call
type BlockingConnectionGater_UnblockSubnet_Call ¶
BlockingConnectionGater_UnblockSubnet_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UnblockSubnet'
func (*BlockingConnectionGater_UnblockSubnet_Call) Return ¶
func (_c *BlockingConnectionGater_UnblockSubnet_Call) Return(_a0 error) *BlockingConnectionGater_UnblockSubnet_Call
func (*BlockingConnectionGater_UnblockSubnet_Call) Run ¶
func (_c *BlockingConnectionGater_UnblockSubnet_Call) Run(run func(ipnet *net.IPNet)) *BlockingConnectionGater_UnblockSubnet_Call
func (*BlockingConnectionGater_UnblockSubnet_Call) RunAndReturn ¶
func (_c *BlockingConnectionGater_UnblockSubnet_Call) RunAndReturn(run func(*net.IPNet) error) *BlockingConnectionGater_UnblockSubnet_Call
type ExpiryStore ¶
ExpiryStore is an autogenerated mock type for the ExpiryStore type
func NewExpiryStore ¶
func NewExpiryStore(t mockConstructorTestingTNewExpiryStore) *ExpiryStore
NewExpiryStore creates a new instance of ExpiryStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*ExpiryStore) EXPECT ¶
func (_m *ExpiryStore) EXPECT() *ExpiryStore_Expecter
func (*ExpiryStore) GetIPBanExpiration ¶
GetIPBanExpiration provides a mock function with given fields: ip
func (*ExpiryStore) GetPeerBanExpiration ¶
GetPeerBanExpiration provides a mock function with given fields: id
func (*ExpiryStore) SetIPBanExpiration ¶
SetIPBanExpiration provides a mock function with given fields: ip, expiry
func (*ExpiryStore) SetPeerBanExpiration ¶
SetPeerBanExpiration provides a mock function with given fields: id, expiry
type ExpiryStore_Expecter ¶
type ExpiryStore_Expecter struct {
// contains filtered or unexported fields
}
func (*ExpiryStore_Expecter) GetIPBanExpiration ¶
func (_e *ExpiryStore_Expecter) GetIPBanExpiration(ip interface{}) *ExpiryStore_GetIPBanExpiration_Call
GetIPBanExpiration is a helper method to define mock.On call
- ip net.IP
func (*ExpiryStore_Expecter) GetPeerBanExpiration ¶
func (_e *ExpiryStore_Expecter) GetPeerBanExpiration(id interface{}) *ExpiryStore_GetPeerBanExpiration_Call
GetPeerBanExpiration is a helper method to define mock.On call
- id peer.ID
func (*ExpiryStore_Expecter) SetIPBanExpiration ¶
func (_e *ExpiryStore_Expecter) SetIPBanExpiration(ip interface{}, expiry interface{}) *ExpiryStore_SetIPBanExpiration_Call
SetIPBanExpiration is a helper method to define mock.On call
- ip net.IP
- expiry time.Time
func (*ExpiryStore_Expecter) SetPeerBanExpiration ¶
func (_e *ExpiryStore_Expecter) SetPeerBanExpiration(id interface{}, expiry interface{}) *ExpiryStore_SetPeerBanExpiration_Call
SetPeerBanExpiration is a helper method to define mock.On call
- id peer.ID
- expiry time.Time
type ExpiryStore_GetIPBanExpiration_Call ¶
ExpiryStore_GetIPBanExpiration_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetIPBanExpiration'
func (*ExpiryStore_GetIPBanExpiration_Call) Return ¶
func (_c *ExpiryStore_GetIPBanExpiration_Call) Return(_a0 time.Time, _a1 error) *ExpiryStore_GetIPBanExpiration_Call
func (*ExpiryStore_GetIPBanExpiration_Call) Run ¶
func (_c *ExpiryStore_GetIPBanExpiration_Call) Run(run func(ip net.IP)) *ExpiryStore_GetIPBanExpiration_Call
func (*ExpiryStore_GetIPBanExpiration_Call) RunAndReturn ¶
func (_c *ExpiryStore_GetIPBanExpiration_Call) RunAndReturn(run func(net.IP) (time.Time, error)) *ExpiryStore_GetIPBanExpiration_Call
type ExpiryStore_GetPeerBanExpiration_Call ¶
ExpiryStore_GetPeerBanExpiration_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPeerBanExpiration'
func (*ExpiryStore_GetPeerBanExpiration_Call) Return ¶
func (_c *ExpiryStore_GetPeerBanExpiration_Call) Return(_a0 time.Time, _a1 error) *ExpiryStore_GetPeerBanExpiration_Call
func (*ExpiryStore_GetPeerBanExpiration_Call) Run ¶
func (_c *ExpiryStore_GetPeerBanExpiration_Call) Run(run func(id peer.ID)) *ExpiryStore_GetPeerBanExpiration_Call
func (*ExpiryStore_GetPeerBanExpiration_Call) RunAndReturn ¶
func (_c *ExpiryStore_GetPeerBanExpiration_Call) RunAndReturn(run func(peer.ID) (time.Time, error)) *ExpiryStore_GetPeerBanExpiration_Call
type ExpiryStore_SetIPBanExpiration_Call ¶
ExpiryStore_SetIPBanExpiration_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetIPBanExpiration'
func (*ExpiryStore_SetIPBanExpiration_Call) Return ¶
func (_c *ExpiryStore_SetIPBanExpiration_Call) Return(_a0 error) *ExpiryStore_SetIPBanExpiration_Call
func (*ExpiryStore_SetIPBanExpiration_Call) Run ¶
func (_c *ExpiryStore_SetIPBanExpiration_Call) Run(run func(ip net.IP, expiry time.Time)) *ExpiryStore_SetIPBanExpiration_Call
func (*ExpiryStore_SetIPBanExpiration_Call) RunAndReturn ¶
func (_c *ExpiryStore_SetIPBanExpiration_Call) RunAndReturn(run func(net.IP, time.Time) error) *ExpiryStore_SetIPBanExpiration_Call
type ExpiryStore_SetPeerBanExpiration_Call ¶
ExpiryStore_SetPeerBanExpiration_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetPeerBanExpiration'
func (*ExpiryStore_SetPeerBanExpiration_Call) Return ¶
func (_c *ExpiryStore_SetPeerBanExpiration_Call) Return(_a0 error) *ExpiryStore_SetPeerBanExpiration_Call
func (*ExpiryStore_SetPeerBanExpiration_Call) Run ¶
func (_c *ExpiryStore_SetPeerBanExpiration_Call) Run(run func(id peer.ID, expiry time.Time)) *ExpiryStore_SetPeerBanExpiration_Call
func (*ExpiryStore_SetPeerBanExpiration_Call) RunAndReturn ¶
func (_c *ExpiryStore_SetPeerBanExpiration_Call) RunAndReturn(run func(peer.ID, time.Time) error) *ExpiryStore_SetPeerBanExpiration_Call
type Scores ¶
Scores is an autogenerated mock type for the Scores type
func NewScores ¶
func NewScores(t mockConstructorTestingTNewScores) *Scores
NewScores creates a new instance of Scores. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*Scores) EXPECT ¶
func (_m *Scores) EXPECT() *Scores_Expecter
type Scores_Expecter ¶
type Scores_Expecter struct {
// contains filtered or unexported fields
}
func (*Scores_Expecter) GetPeerScore ¶
func (_e *Scores_Expecter) GetPeerScore(id interface{}) *Scores_GetPeerScore_Call
GetPeerScore is a helper method to define mock.On call
- id peer.ID
type Scores_GetPeerScore_Call ¶
Scores_GetPeerScore_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPeerScore'
func (*Scores_GetPeerScore_Call) Return ¶
func (_c *Scores_GetPeerScore_Call) Return(_a0 float64, _a1 error) *Scores_GetPeerScore_Call
func (*Scores_GetPeerScore_Call) Run ¶
func (_c *Scores_GetPeerScore_Call) Run(run func(id peer.ID)) *Scores_GetPeerScore_Call
func (*Scores_GetPeerScore_Call) RunAndReturn ¶
func (_c *Scores_GetPeerScore_Call) RunAndReturn(run func(peer.ID) (float64, error)) *Scores_GetPeerScore_Call