Documentation ¶
Overview ¶
Package mocks is a generated GoMock package.
Index ¶
- type MockFetcher
- func (m *MockFetcher) AddDB(hint fetch.Hint, db database.Getter)
- func (m *MockFetcher) EXPECT() *MockFetcherMockRecorder
- func (m *MockFetcher) GetHash(hash types.Hash32, h fetch.Hint, validateHash bool) chan fetch.HashDataPromiseResult
- func (m *MockFetcher) GetHashes(hash []types.Hash32, hint fetch.Hint, validateHash bool) map[types.Hash32]chan fetch.HashDataPromiseResult
- func (m *MockFetcher) Start()
- func (m *MockFetcher) Stop()
- type MockFetcherMockRecorder
- func (mr *MockFetcherMockRecorder) AddDB(hint, db interface{}) *gomock.Call
- func (mr *MockFetcherMockRecorder) GetHash(hash, h, validateHash interface{}) *gomock.Call
- func (mr *MockFetcherMockRecorder) GetHashes(hash, hint, validateHash interface{}) *gomock.Call
- func (mr *MockFetcherMockRecorder) Start() *gomock.Call
- func (mr *MockFetcherMockRecorder) Stop() *gomock.Call
- type Mocknetwork
- func (m *Mocknetwork) Close()
- func (m *Mocknetwork) EXPECT() *MocknetworkMockRecorder
- func (m *Mocknetwork) GetPeers() []peers.Peer
- func (m *Mocknetwork) PeerCount() uint64
- func (m *Mocknetwork) RegisterBytesMsgHandler(msgType server.MessageType, ...)
- func (m *Mocknetwork) SendRequest(ctx context.Context, msgType server.MessageType, payload []byte, ...) error
- type MocknetworkMockRecorder
- func (mr *MocknetworkMockRecorder) Close() *gomock.Call
- func (mr *MocknetworkMockRecorder) GetPeers() *gomock.Call
- func (mr *MocknetworkMockRecorder) PeerCount() *gomock.Call
- func (mr *MocknetworkMockRecorder) RegisterBytesMsgHandler(msgType, reqHandler interface{}) *gomock.Call
- func (mr *MocknetworkMockRecorder) SendRequest(ctx, msgType, payload, address, resHandler, failHandler interface{}) *gomock.Call
- type MockpeersProvider
- type MockpeersProviderMockRecorder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockFetcher ¶
type MockFetcher struct {
// contains filtered or unexported fields
}
MockFetcher is a mock of Fetcher interface.
func NewMockFetcher ¶
func NewMockFetcher(ctrl *gomock.Controller) *MockFetcher
NewMockFetcher creates a new mock instance.
func (*MockFetcher) AddDB ¶
func (m *MockFetcher) AddDB(hint fetch.Hint, db database.Getter)
AddDB mocks base method.
func (*MockFetcher) EXPECT ¶
func (m *MockFetcher) EXPECT() *MockFetcherMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockFetcher) GetHash ¶
func (m *MockFetcher) GetHash(hash types.Hash32, h fetch.Hint, validateHash bool) chan fetch.HashDataPromiseResult
GetHash mocks base method.
type MockFetcherMockRecorder ¶
type MockFetcherMockRecorder struct {
// contains filtered or unexported fields
}
MockFetcherMockRecorder is the mock recorder for MockFetcher.
func (*MockFetcherMockRecorder) AddDB ¶
func (mr *MockFetcherMockRecorder) AddDB(hint, db interface{}) *gomock.Call
AddDB indicates an expected call of AddDB.
func (*MockFetcherMockRecorder) GetHash ¶
func (mr *MockFetcherMockRecorder) GetHash(hash, h, validateHash interface{}) *gomock.Call
GetHash indicates an expected call of GetHash.
func (*MockFetcherMockRecorder) GetHashes ¶
func (mr *MockFetcherMockRecorder) GetHashes(hash, hint, validateHash interface{}) *gomock.Call
GetHashes indicates an expected call of GetHashes.
func (*MockFetcherMockRecorder) Start ¶
func (mr *MockFetcherMockRecorder) Start() *gomock.Call
Start indicates an expected call of Start.
func (*MockFetcherMockRecorder) Stop ¶
func (mr *MockFetcherMockRecorder) Stop() *gomock.Call
Stop indicates an expected call of Stop.
type Mocknetwork ¶
type Mocknetwork struct {
// contains filtered or unexported fields
}
Mocknetwork is a mock of network interface.
func NewMocknetwork ¶
func NewMocknetwork(ctrl *gomock.Controller) *Mocknetwork
NewMocknetwork creates a new mock instance.
func (*Mocknetwork) EXPECT ¶
func (m *Mocknetwork) EXPECT() *MocknetworkMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*Mocknetwork) GetPeers ¶
func (m *Mocknetwork) GetPeers() []peers.Peer
GetPeers mocks base method.
func (*Mocknetwork) PeerCount ¶
func (m *Mocknetwork) PeerCount() uint64
PeerCount mocks base method.
func (*Mocknetwork) RegisterBytesMsgHandler ¶
func (m *Mocknetwork) RegisterBytesMsgHandler(msgType server.MessageType, reqHandler func(context.Context, []byte) ([]byte, error))
RegisterBytesMsgHandler mocks base method.
func (*Mocknetwork) SendRequest ¶
func (m *Mocknetwork) SendRequest(ctx context.Context, msgType server.MessageType, payload []byte, address p2pcrypto.PublicKey, resHandler func([]byte), failHandler func(error)) error
SendRequest mocks base method.
type MocknetworkMockRecorder ¶
type MocknetworkMockRecorder struct {
// contains filtered or unexported fields
}
MocknetworkMockRecorder is the mock recorder for Mocknetwork.
func (*MocknetworkMockRecorder) Close ¶
func (mr *MocknetworkMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close.
func (*MocknetworkMockRecorder) GetPeers ¶
func (mr *MocknetworkMockRecorder) GetPeers() *gomock.Call
GetPeers indicates an expected call of GetPeers.
func (*MocknetworkMockRecorder) PeerCount ¶
func (mr *MocknetworkMockRecorder) PeerCount() *gomock.Call
PeerCount indicates an expected call of PeerCount.
func (*MocknetworkMockRecorder) RegisterBytesMsgHandler ¶
func (mr *MocknetworkMockRecorder) RegisterBytesMsgHandler(msgType, reqHandler interface{}) *gomock.Call
RegisterBytesMsgHandler indicates an expected call of RegisterBytesMsgHandler.
func (*MocknetworkMockRecorder) SendRequest ¶
func (mr *MocknetworkMockRecorder) SendRequest(ctx, msgType, payload, address, resHandler, failHandler interface{}) *gomock.Call
SendRequest indicates an expected call of SendRequest.
type MockpeersProvider ¶
type MockpeersProvider struct {
// contains filtered or unexported fields
}
MockpeersProvider is a mock of peersProvider interface.
func NewMockpeersProvider ¶
func NewMockpeersProvider(ctrl *gomock.Controller) *MockpeersProvider
NewMockpeersProvider creates a new mock instance.
func (*MockpeersProvider) EXPECT ¶
func (m *MockpeersProvider) EXPECT() *MockpeersProviderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockpeersProvider) GetPeers ¶
func (m *MockpeersProvider) GetPeers() []peers.Peer
GetPeers mocks base method.
func (*MockpeersProvider) PeerCount ¶
func (m *MockpeersProvider) PeerCount() uint64
PeerCount mocks base method.
type MockpeersProviderMockRecorder ¶
type MockpeersProviderMockRecorder struct {
// contains filtered or unexported fields
}
MockpeersProviderMockRecorder is the mock recorder for MockpeersProvider.
func (*MockpeersProviderMockRecorder) Close ¶
func (mr *MockpeersProviderMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close.
func (*MockpeersProviderMockRecorder) GetPeers ¶
func (mr *MockpeersProviderMockRecorder) GetPeers() *gomock.Call
GetPeers indicates an expected call of GetPeers.
func (*MockpeersProviderMockRecorder) PeerCount ¶
func (mr *MockpeersProviderMockRecorder) PeerCount() *gomock.Call
PeerCount indicates an expected call of PeerCount.