github.com/cloudwego/kitex@v0.9.0/internal/mocks/remote/connpool.go (about)

     1  /*
     2   * Copyright 2022 CloudWeGo Authors
     3   *
     4   * Licensed under the Apache License, Version 2.0 (the "License");
     5   * you may not use this file except in compliance with the License.
     6   * You may obtain a copy of the License at
     7   *
     8   *     http://www.apache.org/licenses/LICENSE-2.0
     9   *
    10   * Unless required by applicable law or agreed to in writing, software
    11   * distributed under the License is distributed on an "AS IS" BASIS,
    12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13   * See the License for the specific language governing permissions and
    14   * limitations under the License.
    15  */
    16  
    17  
    18  // Code generated by MockGen. DO NOT EDIT.
    19  // Source: ../../pkg/remote/connpool.go
    20  
    21  // Package remote is a generated GoMock package.
    22  package remote
    23  
    24  import (
    25  	context "context"
    26  	net "net"
    27  	reflect "reflect"
    28  
    29  	remote "github.com/cloudwego/kitex/pkg/remote"
    30  	gomock "github.com/golang/mock/gomock"
    31  )
    32  
    33  // MockConnPool is a mock of ConnPool interface.
    34  type MockConnPool struct {
    35  	ctrl     *gomock.Controller
    36  	recorder *MockConnPoolMockRecorder
    37  }
    38  
    39  // MockConnPoolMockRecorder is the mock recorder for MockConnPool.
    40  type MockConnPoolMockRecorder struct {
    41  	mock *MockConnPool
    42  }
    43  
    44  // NewMockConnPool creates a new mock instance.
    45  func NewMockConnPool(ctrl *gomock.Controller) *MockConnPool {
    46  	mock := &MockConnPool{ctrl: ctrl}
    47  	mock.recorder = &MockConnPoolMockRecorder{mock}
    48  	return mock
    49  }
    50  
    51  // EXPECT returns an object that allows the caller to indicate expected use.
    52  func (m *MockConnPool) EXPECT() *MockConnPoolMockRecorder {
    53  	return m.recorder
    54  }
    55  
    56  // Close mocks base method.
    57  func (m *MockConnPool) Close() error {
    58  	m.ctrl.T.Helper()
    59  	ret := m.ctrl.Call(m, "Close")
    60  	ret0, _ := ret[0].(error)
    61  	return ret0
    62  }
    63  
    64  // Close indicates an expected call of Close.
    65  func (mr *MockConnPoolMockRecorder) Close() *gomock.Call {
    66  	mr.mock.ctrl.T.Helper()
    67  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockConnPool)(nil).Close))
    68  }
    69  
    70  // Discard mocks base method.
    71  func (m *MockConnPool) Discard(conn net.Conn) error {
    72  	m.ctrl.T.Helper()
    73  	ret := m.ctrl.Call(m, "Discard", conn)
    74  	ret0, _ := ret[0].(error)
    75  	return ret0
    76  }
    77  
    78  // Discard indicates an expected call of Discard.
    79  func (mr *MockConnPoolMockRecorder) Discard(conn interface{}) *gomock.Call {
    80  	mr.mock.ctrl.T.Helper()
    81  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Discard", reflect.TypeOf((*MockConnPool)(nil).Discard), conn)
    82  }
    83  
    84  // Get mocks base method.
    85  func (m *MockConnPool) Get(ctx context.Context, network, address string, opt remote.ConnOption) (net.Conn, error) {
    86  	m.ctrl.T.Helper()
    87  	ret := m.ctrl.Call(m, "Get", ctx, network, address, opt)
    88  	ret0, _ := ret[0].(net.Conn)
    89  	ret1, _ := ret[1].(error)
    90  	return ret0, ret1
    91  }
    92  
    93  // Get indicates an expected call of Get.
    94  func (mr *MockConnPoolMockRecorder) Get(ctx, network, address, opt interface{}) *gomock.Call {
    95  	mr.mock.ctrl.T.Helper()
    96  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockConnPool)(nil).Get), ctx, network, address, opt)
    97  }
    98  
    99  // Put mocks base method.
   100  func (m *MockConnPool) Put(conn net.Conn) error {
   101  	m.ctrl.T.Helper()
   102  	ret := m.ctrl.Call(m, "Put", conn)
   103  	ret0, _ := ret[0].(error)
   104  	return ret0
   105  }
   106  
   107  // Put indicates an expected call of Put.
   108  func (mr *MockConnPoolMockRecorder) Put(conn interface{}) *gomock.Call {
   109  	mr.mock.ctrl.T.Helper()
   110  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockConnPool)(nil).Put), conn)
   111  }
   112  
   113  // MockLongConnPool is a mock of LongConnPool interface.
   114  type MockLongConnPool struct {
   115  	ctrl     *gomock.Controller
   116  	recorder *MockLongConnPoolMockRecorder
   117  }
   118  
   119  // MockLongConnPoolMockRecorder is the mock recorder for MockLongConnPool.
   120  type MockLongConnPoolMockRecorder struct {
   121  	mock *MockLongConnPool
   122  }
   123  
   124  // NewMockLongConnPool creates a new mock instance.
   125  func NewMockLongConnPool(ctrl *gomock.Controller) *MockLongConnPool {
   126  	mock := &MockLongConnPool{ctrl: ctrl}
   127  	mock.recorder = &MockLongConnPoolMockRecorder{mock}
   128  	return mock
   129  }
   130  
   131  // EXPECT returns an object that allows the caller to indicate expected use.
   132  func (m *MockLongConnPool) EXPECT() *MockLongConnPoolMockRecorder {
   133  	return m.recorder
   134  }
   135  
   136  // Clean mocks base method.
   137  func (m *MockLongConnPool) Clean(network, address string) {
   138  	m.ctrl.T.Helper()
   139  	m.ctrl.Call(m, "Clean", network, address)
   140  }
   141  
   142  // Clean indicates an expected call of Clean.
   143  func (mr *MockLongConnPoolMockRecorder) Clean(network, address interface{}) *gomock.Call {
   144  	mr.mock.ctrl.T.Helper()
   145  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Clean", reflect.TypeOf((*MockLongConnPool)(nil).Clean), network, address)
   146  }
   147  
   148  // Close mocks base method.
   149  func (m *MockLongConnPool) Close() error {
   150  	m.ctrl.T.Helper()
   151  	ret := m.ctrl.Call(m, "Close")
   152  	ret0, _ := ret[0].(error)
   153  	return ret0
   154  }
   155  
   156  // Close indicates an expected call of Close.
   157  func (mr *MockLongConnPoolMockRecorder) Close() *gomock.Call {
   158  	mr.mock.ctrl.T.Helper()
   159  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockLongConnPool)(nil).Close))
   160  }
   161  
   162  // Discard mocks base method.
   163  func (m *MockLongConnPool) Discard(conn net.Conn) error {
   164  	m.ctrl.T.Helper()
   165  	ret := m.ctrl.Call(m, "Discard", conn)
   166  	ret0, _ := ret[0].(error)
   167  	return ret0
   168  }
   169  
   170  // Discard indicates an expected call of Discard.
   171  func (mr *MockLongConnPoolMockRecorder) Discard(conn interface{}) *gomock.Call {
   172  	mr.mock.ctrl.T.Helper()
   173  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Discard", reflect.TypeOf((*MockLongConnPool)(nil).Discard), conn)
   174  }
   175  
   176  // Get mocks base method.
   177  func (m *MockLongConnPool) Get(ctx context.Context, network, address string, opt remote.ConnOption) (net.Conn, error) {
   178  	m.ctrl.T.Helper()
   179  	ret := m.ctrl.Call(m, "Get", ctx, network, address, opt)
   180  	ret0, _ := ret[0].(net.Conn)
   181  	ret1, _ := ret[1].(error)
   182  	return ret0, ret1
   183  }
   184  
   185  // Get indicates an expected call of Get.
   186  func (mr *MockLongConnPoolMockRecorder) Get(ctx, network, address, opt interface{}) *gomock.Call {
   187  	mr.mock.ctrl.T.Helper()
   188  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockLongConnPool)(nil).Get), ctx, network, address, opt)
   189  }
   190  
   191  // Put mocks base method.
   192  func (m *MockLongConnPool) Put(conn net.Conn) error {
   193  	m.ctrl.T.Helper()
   194  	ret := m.ctrl.Call(m, "Put", conn)
   195  	ret0, _ := ret[0].(error)
   196  	return ret0
   197  }
   198  
   199  // Put indicates an expected call of Put.
   200  func (mr *MockLongConnPoolMockRecorder) Put(conn interface{}) *gomock.Call {
   201  	mr.mock.ctrl.T.Helper()
   202  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Put", reflect.TypeOf((*MockLongConnPool)(nil).Put), conn)
   203  }
   204  
   205  // MockConnPoolReporter is a mock of ConnPoolReporter interface.
   206  type MockConnPoolReporter struct {
   207  	ctrl     *gomock.Controller
   208  	recorder *MockConnPoolReporterMockRecorder
   209  }
   210  
   211  // MockConnPoolReporterMockRecorder is the mock recorder for MockConnPoolReporter.
   212  type MockConnPoolReporterMockRecorder struct {
   213  	mock *MockConnPoolReporter
   214  }
   215  
   216  // NewMockConnPoolReporter creates a new mock instance.
   217  func NewMockConnPoolReporter(ctrl *gomock.Controller) *MockConnPoolReporter {
   218  	mock := &MockConnPoolReporter{ctrl: ctrl}
   219  	mock.recorder = &MockConnPoolReporterMockRecorder{mock}
   220  	return mock
   221  }
   222  
   223  // EXPECT returns an object that allows the caller to indicate expected use.
   224  func (m *MockConnPoolReporter) EXPECT() *MockConnPoolReporterMockRecorder {
   225  	return m.recorder
   226  }
   227  
   228  // EnableReporter mocks base method.
   229  func (m *MockConnPoolReporter) EnableReporter() {
   230  	m.ctrl.T.Helper()
   231  	m.ctrl.Call(m, "EnableReporter")
   232  }
   233  
   234  // EnableReporter indicates an expected call of EnableReporter.
   235  func (mr *MockConnPoolReporterMockRecorder) EnableReporter() *gomock.Call {
   236  	mr.mock.ctrl.T.Helper()
   237  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnableReporter", reflect.TypeOf((*MockConnPoolReporter)(nil).EnableReporter))
   238  }
   239  
   240  // MockRawConn is a mock of RawConn interface.
   241  type MockRawConn struct {
   242  	ctrl     *gomock.Controller
   243  	recorder *MockRawConnMockRecorder
   244  }
   245  
   246  // MockRawConnMockRecorder is the mock recorder for MockRawConn.
   247  type MockRawConnMockRecorder struct {
   248  	mock *MockRawConn
   249  }
   250  
   251  // NewMockRawConn creates a new mock instance.
   252  func NewMockRawConn(ctrl *gomock.Controller) *MockRawConn {
   253  	mock := &MockRawConn{ctrl: ctrl}
   254  	mock.recorder = &MockRawConnMockRecorder{mock}
   255  	return mock
   256  }
   257  
   258  // EXPECT returns an object that allows the caller to indicate expected use.
   259  func (m *MockRawConn) EXPECT() *MockRawConnMockRecorder {
   260  	return m.recorder
   261  }
   262  
   263  // RawConn mocks base method.
   264  func (m *MockRawConn) RawConn() net.Conn {
   265  	m.ctrl.T.Helper()
   266  	ret := m.ctrl.Call(m, "RawConn")
   267  	ret0, _ := ret[0].(net.Conn)
   268  	return ret0
   269  }
   270  
   271  // RawConn indicates an expected call of RawConn.
   272  func (mr *MockRawConnMockRecorder) RawConn() *gomock.Call {
   273  	mr.mock.ctrl.T.Helper()
   274  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RawConn", reflect.TypeOf((*MockRawConn)(nil).RawConn))
   275  }
   276  
   277  // MockIsActive is a mock of IsActive interface.
   278  type MockIsActive struct {
   279  	ctrl     *gomock.Controller
   280  	recorder *MockIsActiveMockRecorder
   281  }
   282  
   283  // MockIsActiveMockRecorder is the mock recorder for MockIsActive.
   284  type MockIsActiveMockRecorder struct {
   285  	mock *MockIsActive
   286  }
   287  
   288  // NewMockIsActive creates a new mock instance.
   289  func NewMockIsActive(ctrl *gomock.Controller) *MockIsActive {
   290  	mock := &MockIsActive{ctrl: ctrl}
   291  	mock.recorder = &MockIsActiveMockRecorder{mock}
   292  	return mock
   293  }
   294  
   295  // EXPECT returns an object that allows the caller to indicate expected use.
   296  func (m *MockIsActive) EXPECT() *MockIsActiveMockRecorder {
   297  	return m.recorder
   298  }
   299  
   300  // IsActive mocks base method.
   301  func (m *MockIsActive) IsActive() bool {
   302  	m.ctrl.T.Helper()
   303  	ret := m.ctrl.Call(m, "IsActive")
   304  	ret0, _ := ret[0].(bool)
   305  	return ret0
   306  }
   307  
   308  // IsActive indicates an expected call of IsActive.
   309  func (mr *MockIsActiveMockRecorder) IsActive() *gomock.Call {
   310  	mr.mock.ctrl.T.Helper()
   311  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsActive", reflect.TypeOf((*MockIsActive)(nil).IsActive))
   312  }