go.uber.org/yarpc@v1.72.1/api/peer/peertest/list.go (about)

     1  // Code generated by MockGen. DO NOT EDIT.
     2  // Source: go.uber.org/yarpc/api/peer (interfaces: Chooser,List,ChooserList)
     3  
     4  // Copyright (c) 2022 Uber Technologies, Inc.
     5  //
     6  // Permission is hereby granted, free of charge, to any person obtaining a copy
     7  // of this software and associated documentation files (the "Software"), to deal
     8  // in the Software without restriction, including without limitation the rights
     9  // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    10  // copies of the Software, and to permit persons to whom the Software is
    11  // furnished to do so, subject to the following conditions:
    12  //
    13  // The above copyright notice and this permission notice shall be included in
    14  // all copies or substantial portions of the Software.
    15  //
    16  // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    17  // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    18  // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    19  // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    20  // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    21  // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
    22  // THE SOFTWARE.
    23  
    24  // Package peertest is a generated GoMock package.
    25  package peertest
    26  
    27  import (
    28  	context "context"
    29  	gomock "github.com/golang/mock/gomock"
    30  	peer "go.uber.org/yarpc/api/peer"
    31  	transport "go.uber.org/yarpc/api/transport"
    32  	reflect "reflect"
    33  )
    34  
    35  // MockChooser is a mock of Chooser interface
    36  type MockChooser struct {
    37  	ctrl     *gomock.Controller
    38  	recorder *MockChooserMockRecorder
    39  }
    40  
    41  // MockChooserMockRecorder is the mock recorder for MockChooser
    42  type MockChooserMockRecorder struct {
    43  	mock *MockChooser
    44  }
    45  
    46  // NewMockChooser creates a new mock instance
    47  func NewMockChooser(ctrl *gomock.Controller) *MockChooser {
    48  	mock := &MockChooser{ctrl: ctrl}
    49  	mock.recorder = &MockChooserMockRecorder{mock}
    50  	return mock
    51  }
    52  
    53  // EXPECT returns an object that allows the caller to indicate expected use
    54  func (m *MockChooser) EXPECT() *MockChooserMockRecorder {
    55  	return m.recorder
    56  }
    57  
    58  // Choose mocks base method
    59  func (m *MockChooser) Choose(arg0 context.Context, arg1 *transport.Request) (peer.Peer, func(error), error) {
    60  	m.ctrl.T.Helper()
    61  	ret := m.ctrl.Call(m, "Choose", arg0, arg1)
    62  	ret0, _ := ret[0].(peer.Peer)
    63  	ret1, _ := ret[1].(func(error))
    64  	ret2, _ := ret[2].(error)
    65  	return ret0, ret1, ret2
    66  }
    67  
    68  // Choose indicates an expected call of Choose
    69  func (mr *MockChooserMockRecorder) Choose(arg0, arg1 interface{}) *gomock.Call {
    70  	mr.mock.ctrl.T.Helper()
    71  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Choose", reflect.TypeOf((*MockChooser)(nil).Choose), arg0, arg1)
    72  }
    73  
    74  // IsRunning mocks base method
    75  func (m *MockChooser) IsRunning() bool {
    76  	m.ctrl.T.Helper()
    77  	ret := m.ctrl.Call(m, "IsRunning")
    78  	ret0, _ := ret[0].(bool)
    79  	return ret0
    80  }
    81  
    82  // IsRunning indicates an expected call of IsRunning
    83  func (mr *MockChooserMockRecorder) IsRunning() *gomock.Call {
    84  	mr.mock.ctrl.T.Helper()
    85  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsRunning", reflect.TypeOf((*MockChooser)(nil).IsRunning))
    86  }
    87  
    88  // Start mocks base method
    89  func (m *MockChooser) Start() error {
    90  	m.ctrl.T.Helper()
    91  	ret := m.ctrl.Call(m, "Start")
    92  	ret0, _ := ret[0].(error)
    93  	return ret0
    94  }
    95  
    96  // Start indicates an expected call of Start
    97  func (mr *MockChooserMockRecorder) Start() *gomock.Call {
    98  	mr.mock.ctrl.T.Helper()
    99  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockChooser)(nil).Start))
   100  }
   101  
   102  // Stop mocks base method
   103  func (m *MockChooser) Stop() error {
   104  	m.ctrl.T.Helper()
   105  	ret := m.ctrl.Call(m, "Stop")
   106  	ret0, _ := ret[0].(error)
   107  	return ret0
   108  }
   109  
   110  // Stop indicates an expected call of Stop
   111  func (mr *MockChooserMockRecorder) Stop() *gomock.Call {
   112  	mr.mock.ctrl.T.Helper()
   113  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockChooser)(nil).Stop))
   114  }
   115  
   116  // MockList is a mock of List interface
   117  type MockList struct {
   118  	ctrl     *gomock.Controller
   119  	recorder *MockListMockRecorder
   120  }
   121  
   122  // MockListMockRecorder is the mock recorder for MockList
   123  type MockListMockRecorder struct {
   124  	mock *MockList
   125  }
   126  
   127  // NewMockList creates a new mock instance
   128  func NewMockList(ctrl *gomock.Controller) *MockList {
   129  	mock := &MockList{ctrl: ctrl}
   130  	mock.recorder = &MockListMockRecorder{mock}
   131  	return mock
   132  }
   133  
   134  // EXPECT returns an object that allows the caller to indicate expected use
   135  func (m *MockList) EXPECT() *MockListMockRecorder {
   136  	return m.recorder
   137  }
   138  
   139  // Update mocks base method
   140  func (m *MockList) Update(arg0 peer.ListUpdates) error {
   141  	m.ctrl.T.Helper()
   142  	ret := m.ctrl.Call(m, "Update", arg0)
   143  	ret0, _ := ret[0].(error)
   144  	return ret0
   145  }
   146  
   147  // Update indicates an expected call of Update
   148  func (mr *MockListMockRecorder) Update(arg0 interface{}) *gomock.Call {
   149  	mr.mock.ctrl.T.Helper()
   150  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockList)(nil).Update), arg0)
   151  }
   152  
   153  // MockChooserList is a mock of ChooserList interface
   154  type MockChooserList struct {
   155  	ctrl     *gomock.Controller
   156  	recorder *MockChooserListMockRecorder
   157  }
   158  
   159  // MockChooserListMockRecorder is the mock recorder for MockChooserList
   160  type MockChooserListMockRecorder struct {
   161  	mock *MockChooserList
   162  }
   163  
   164  // NewMockChooserList creates a new mock instance
   165  func NewMockChooserList(ctrl *gomock.Controller) *MockChooserList {
   166  	mock := &MockChooserList{ctrl: ctrl}
   167  	mock.recorder = &MockChooserListMockRecorder{mock}
   168  	return mock
   169  }
   170  
   171  // EXPECT returns an object that allows the caller to indicate expected use
   172  func (m *MockChooserList) EXPECT() *MockChooserListMockRecorder {
   173  	return m.recorder
   174  }
   175  
   176  // Choose mocks base method
   177  func (m *MockChooserList) Choose(arg0 context.Context, arg1 *transport.Request) (peer.Peer, func(error), error) {
   178  	m.ctrl.T.Helper()
   179  	ret := m.ctrl.Call(m, "Choose", arg0, arg1)
   180  	ret0, _ := ret[0].(peer.Peer)
   181  	ret1, _ := ret[1].(func(error))
   182  	ret2, _ := ret[2].(error)
   183  	return ret0, ret1, ret2
   184  }
   185  
   186  // Choose indicates an expected call of Choose
   187  func (mr *MockChooserListMockRecorder) Choose(arg0, arg1 interface{}) *gomock.Call {
   188  	mr.mock.ctrl.T.Helper()
   189  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Choose", reflect.TypeOf((*MockChooserList)(nil).Choose), arg0, arg1)
   190  }
   191  
   192  // IsRunning mocks base method
   193  func (m *MockChooserList) IsRunning() bool {
   194  	m.ctrl.T.Helper()
   195  	ret := m.ctrl.Call(m, "IsRunning")
   196  	ret0, _ := ret[0].(bool)
   197  	return ret0
   198  }
   199  
   200  // IsRunning indicates an expected call of IsRunning
   201  func (mr *MockChooserListMockRecorder) IsRunning() *gomock.Call {
   202  	mr.mock.ctrl.T.Helper()
   203  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsRunning", reflect.TypeOf((*MockChooserList)(nil).IsRunning))
   204  }
   205  
   206  // Start mocks base method
   207  func (m *MockChooserList) Start() error {
   208  	m.ctrl.T.Helper()
   209  	ret := m.ctrl.Call(m, "Start")
   210  	ret0, _ := ret[0].(error)
   211  	return ret0
   212  }
   213  
   214  // Start indicates an expected call of Start
   215  func (mr *MockChooserListMockRecorder) Start() *gomock.Call {
   216  	mr.mock.ctrl.T.Helper()
   217  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Start", reflect.TypeOf((*MockChooserList)(nil).Start))
   218  }
   219  
   220  // Stop mocks base method
   221  func (m *MockChooserList) Stop() error {
   222  	m.ctrl.T.Helper()
   223  	ret := m.ctrl.Call(m, "Stop")
   224  	ret0, _ := ret[0].(error)
   225  	return ret0
   226  }
   227  
   228  // Stop indicates an expected call of Stop
   229  func (mr *MockChooserListMockRecorder) Stop() *gomock.Call {
   230  	mr.mock.ctrl.T.Helper()
   231  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockChooserList)(nil).Stop))
   232  }
   233  
   234  // Update mocks base method
   235  func (m *MockChooserList) Update(arg0 peer.ListUpdates) error {
   236  	m.ctrl.T.Helper()
   237  	ret := m.ctrl.Call(m, "Update", arg0)
   238  	ret0, _ := ret[0].(error)
   239  	return ret0
   240  }
   241  
   242  // Update indicates an expected call of Update
   243  func (mr *MockChooserListMockRecorder) Update(arg0 interface{}) *gomock.Call {
   244  	mr.mock.ctrl.T.Helper()
   245  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockChooserList)(nil).Update), arg0)
   246  }