diff --git a/mocks/tracker/announceclient/client.go b/mocks/tracker/announceclient/client.go index aa1fe9787..7c14f1947 100644 --- a/mocks/tracker/announceclient/client.go +++ b/mocks/tracker/announceclient/client.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/uber/kraken/tracker/announceclient (interfaces: Client) +// +// Generated by this command: +// +// mockgen -typed -package mockannounceclient . Client +// // Package mockannounceclient is a generated GoMock package. package mockannounceclient @@ -11,41 +16,103 @@ import ( time "time" ) -// MockClient is a mock of Client interface +// MockClient is a mock of Client interface. type MockClient struct { ctrl *gomock.Controller recorder *MockClientMockRecorder } -// MockClientMockRecorder is the mock recorder for MockClient +// MockClientMockRecorder is the mock recorder for MockClient. type MockClientMockRecorder struct { mock *MockClient } -// NewMockClient creates a new mock instance +// NewMockClient creates a new mock instance. func NewMockClient(ctrl *gomock.Controller) *MockClient { mock := &MockClient{ctrl: ctrl} mock.recorder = &MockClientMockRecorder{mock} return mock } -// EXPECT returns an object that allows the caller to indicate expected use +// EXPECT returns an object that allows the caller to indicate expected use. func (m *MockClient) EXPECT() *MockClientMockRecorder { return m.recorder } -// Announce mocks base method -func (m *MockClient) Announce(arg0 core.Digest, arg1 core.InfoHash, arg2 bool, arg3 int) ([]*core.PeerInfo, time.Duration, error) { +// Announce mocks base method. +func (m *MockClient) Announce(d core.Digest, h core.InfoHash, complete bool, version int) ([]*core.PeerInfo, time.Duration, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Announce", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "Announce", d, h, complete, version) ret0, _ := ret[0].([]*core.PeerInfo) ret1, _ := ret[1].(time.Duration) ret2, _ := ret[2].(error) return ret0, ret1, ret2 } -// Announce indicates an expected call of Announce -func (mr *MockClientMockRecorder) Announce(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +// Announce indicates an expected call of Announce. +func (mr *MockClientMockRecorder) Announce(d, h, complete, version interface{}) *MockClientAnnounceCall { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Announce", reflect.TypeOf((*MockClient)(nil).Announce), arg0, arg1, arg2, arg3) + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Announce", reflect.TypeOf((*MockClient)(nil).Announce), d, h, complete, version) + return &MockClientAnnounceCall{Call: call} +} + +// MockClientAnnounceCall wrap *gomock.Call +type MockClientAnnounceCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientAnnounceCall) Return(arg0 []*core.PeerInfo, arg1 time.Duration, arg2 error) *MockClientAnnounceCall { + c.Call = c.Call.Return(arg0, arg1, arg2) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientAnnounceCall) Do(f func(core.Digest, core.InfoHash, bool, int) ([]*core.PeerInfo, time.Duration, error)) *MockClientAnnounceCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientAnnounceCall) DoAndReturn(f func(core.Digest, core.InfoHash, bool, int) ([]*core.PeerInfo, time.Duration, error)) *MockClientAnnounceCall { + c.Call = c.Call.DoAndReturn(f) + return c +} + +// CheckReadiness mocks base method. +func (m *MockClient) CheckReadiness() error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "CheckReadiness") + ret0, _ := ret[0].(error) + return ret0 +} + +// CheckReadiness indicates an expected call of CheckReadiness. +func (mr *MockClientMockRecorder) CheckReadiness() *MockClientCheckReadinessCall { + mr.mock.ctrl.T.Helper() + call := mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CheckReadiness", reflect.TypeOf((*MockClient)(nil).CheckReadiness)) + return &MockClientCheckReadinessCall{Call: call} +} + +// MockClientCheckReadinessCall wrap *gomock.Call +type MockClientCheckReadinessCall struct { + *gomock.Call +} + +// Return rewrite *gomock.Call.Return +func (c *MockClientCheckReadinessCall) Return(arg0 error) *MockClientCheckReadinessCall { + c.Call = c.Call.Return(arg0) + return c +} + +// Do rewrite *gomock.Call.Do +func (c *MockClientCheckReadinessCall) Do(f func() error) *MockClientCheckReadinessCall { + c.Call = c.Call.Do(f) + return c +} + +// DoAndReturn rewrite *gomock.Call.DoAndReturn +func (c *MockClientCheckReadinessCall) DoAndReturn(f func() error) *MockClientCheckReadinessCall { + c.Call = c.Call.DoAndReturn(f) + return c }