Documentation ¶
Index ¶
- type PeerManager
- type PeerManager_BanPeer_Call
- type PeerManager_Expecter
- func (_e *PeerManager_Expecter) BanPeer(_a0 interface{}, _a1 interface{}) *PeerManager_BanPeer_Call
- func (_e *PeerManager_Expecter) GetPeerScore(id interface{}) *PeerManager_GetPeerScore_Call
- func (_e *PeerManager_Expecter) IsStatic(_a0 interface{}) *PeerManager_IsStatic_Call
- func (_e *PeerManager_Expecter) Peers() *PeerManager_Peers_Call
- type PeerManager_GetPeerScore_Call
- func (_c *PeerManager_GetPeerScore_Call) Return(_a0 float64, _a1 error) *PeerManager_GetPeerScore_Call
- func (_c *PeerManager_GetPeerScore_Call) Run(run func(id peer.ID)) *PeerManager_GetPeerScore_Call
- func (_c *PeerManager_GetPeerScore_Call) RunAndReturn(run func(peer.ID) (float64, error)) *PeerManager_GetPeerScore_Call
- type PeerManager_IsStatic_Call
- type PeerManager_Peers_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PeerManager ¶
PeerManager is an autogenerated mock type for the PeerManager type
func NewPeerManager ¶
func NewPeerManager(t mockConstructorTestingTNewPeerManager) *PeerManager
NewPeerManager creates a new instance of PeerManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*PeerManager) EXPECT ¶
func (_m *PeerManager) EXPECT() *PeerManager_Expecter
func (*PeerManager) GetPeerScore ¶
func (_m *PeerManager) GetPeerScore(id peer.ID) (float64, error)
GetPeerScore provides a mock function with given fields: id
func (*PeerManager) IsStatic ¶
func (_m *PeerManager) IsStatic(_a0 peer.ID) bool
IsStatic provides a mock function with given fields: _a0
func (*PeerManager) Peers ¶
func (_m *PeerManager) Peers() []peer.ID
Peers provides a mock function with given fields:
type PeerManager_BanPeer_Call ¶
PeerManager_BanPeer_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BanPeer'
func (*PeerManager_BanPeer_Call) Return ¶
func (_c *PeerManager_BanPeer_Call) Return(_a0 error) *PeerManager_BanPeer_Call
func (*PeerManager_BanPeer_Call) Run ¶
func (_c *PeerManager_BanPeer_Call) Run(run func(_a0 peer.ID, _a1 time.Time)) *PeerManager_BanPeer_Call
func (*PeerManager_BanPeer_Call) RunAndReturn ¶
func (_c *PeerManager_BanPeer_Call) RunAndReturn(run func(peer.ID, time.Time) error) *PeerManager_BanPeer_Call
type PeerManager_Expecter ¶
type PeerManager_Expecter struct {
// contains filtered or unexported fields
}
func (*PeerManager_Expecter) BanPeer ¶
func (_e *PeerManager_Expecter) BanPeer(_a0 interface{}, _a1 interface{}) *PeerManager_BanPeer_Call
BanPeer is a helper method to define mock.On call
- _a0 peer.ID
- _a1 time.Time
func (*PeerManager_Expecter) GetPeerScore ¶
func (_e *PeerManager_Expecter) GetPeerScore(id interface{}) *PeerManager_GetPeerScore_Call
GetPeerScore is a helper method to define mock.On call
- id peer.ID
func (*PeerManager_Expecter) IsStatic ¶
func (_e *PeerManager_Expecter) IsStatic(_a0 interface{}) *PeerManager_IsStatic_Call
IsStatic is a helper method to define mock.On call
- _a0 peer.ID
func (*PeerManager_Expecter) Peers ¶
func (_e *PeerManager_Expecter) Peers() *PeerManager_Peers_Call
Peers is a helper method to define mock.On call
type PeerManager_GetPeerScore_Call ¶
PeerManager_GetPeerScore_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetPeerScore'
func (*PeerManager_GetPeerScore_Call) Return ¶
func (_c *PeerManager_GetPeerScore_Call) Return(_a0 float64, _a1 error) *PeerManager_GetPeerScore_Call
func (*PeerManager_GetPeerScore_Call) Run ¶
func (_c *PeerManager_GetPeerScore_Call) Run(run func(id peer.ID)) *PeerManager_GetPeerScore_Call
func (*PeerManager_GetPeerScore_Call) RunAndReturn ¶
func (_c *PeerManager_GetPeerScore_Call) RunAndReturn(run func(peer.ID) (float64, error)) *PeerManager_GetPeerScore_Call
type PeerManager_IsStatic_Call ¶
PeerManager_IsStatic_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsStatic'
func (*PeerManager_IsStatic_Call) Return ¶
func (_c *PeerManager_IsStatic_Call) Return(_a0 bool) *PeerManager_IsStatic_Call
func (*PeerManager_IsStatic_Call) Run ¶
func (_c *PeerManager_IsStatic_Call) Run(run func(_a0 peer.ID)) *PeerManager_IsStatic_Call
func (*PeerManager_IsStatic_Call) RunAndReturn ¶
func (_c *PeerManager_IsStatic_Call) RunAndReturn(run func(peer.ID) bool) *PeerManager_IsStatic_Call
type PeerManager_Peers_Call ¶
PeerManager_Peers_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Peers'
func (*PeerManager_Peers_Call) Return ¶
func (_c *PeerManager_Peers_Call) Return(_a0 []peer.ID) *PeerManager_Peers_Call
func (*PeerManager_Peers_Call) Run ¶
func (_c *PeerManager_Peers_Call) Run(run func()) *PeerManager_Peers_Call
func (*PeerManager_Peers_Call) RunAndReturn ¶
func (_c *PeerManager_Peers_Call) RunAndReturn(run func() []peer.ID) *PeerManager_Peers_Call