github.com/m3db/m3@v1.5.0/src/msg/producer/writer/keep_alivable_mock_test.go (about)

     1  // Code generated by MockGen. DO NOT EDIT.
     2  // Source: github.com/m3db/m3/src/msg/producer/writer/consumer_go
     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 writer is a generated GoMock package.
    25  package writer
    26  
    27  import (
    28  	"reflect"
    29  	"time"
    30  
    31  	"github.com/golang/mock/gomock"
    32  )
    33  
    34  // MockconsumerWriter is a mock of consumerWriter interface.
    35  type MockconsumerWriter struct {
    36  	ctrl     *gomock.Controller
    37  	recorder *MockconsumerWriterMockRecorder
    38  }
    39  
    40  // MockconsumerWriterMockRecorder is the mock recorder for MockconsumerWriter.
    41  type MockconsumerWriterMockRecorder struct {
    42  	mock *MockconsumerWriter
    43  }
    44  
    45  // NewMockconsumerWriter creates a new mock instance.
    46  func NewMockconsumerWriter(ctrl *gomock.Controller) *MockconsumerWriter {
    47  	mock := &MockconsumerWriter{ctrl: ctrl}
    48  	mock.recorder = &MockconsumerWriterMockRecorder{mock}
    49  	return mock
    50  }
    51  
    52  // EXPECT returns an object that allows the caller to indicate expected use.
    53  func (m *MockconsumerWriter) EXPECT() *MockconsumerWriterMockRecorder {
    54  	return m.recorder
    55  }
    56  
    57  // Address mocks base method.
    58  func (m *MockconsumerWriter) Address() string {
    59  	m.ctrl.T.Helper()
    60  	ret := m.ctrl.Call(m, "Address")
    61  	ret0, _ := ret[0].(string)
    62  	return ret0
    63  }
    64  
    65  // Address indicates an expected call of Address.
    66  func (mr *MockconsumerWriterMockRecorder) Address() *gomock.Call {
    67  	mr.mock.ctrl.T.Helper()
    68  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Address", reflect.TypeOf((*MockconsumerWriter)(nil).Address))
    69  }
    70  
    71  // Close mocks base method.
    72  func (m *MockconsumerWriter) Close() {
    73  	m.ctrl.T.Helper()
    74  	m.ctrl.Call(m, "Close")
    75  }
    76  
    77  // Close indicates an expected call of Close.
    78  func (mr *MockconsumerWriterMockRecorder) Close() *gomock.Call {
    79  	mr.mock.ctrl.T.Helper()
    80  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockconsumerWriter)(nil).Close))
    81  }
    82  
    83  // Init mocks base method.
    84  func (m *MockconsumerWriter) Init() {
    85  	m.ctrl.T.Helper()
    86  	m.ctrl.Call(m, "Init")
    87  }
    88  
    89  // Init indicates an expected call of Init.
    90  func (mr *MockconsumerWriterMockRecorder) Init() *gomock.Call {
    91  	mr.mock.ctrl.T.Helper()
    92  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockconsumerWriter)(nil).Init))
    93  }
    94  
    95  // Write mocks base method.
    96  func (m *MockconsumerWriter) Write(connIndex int, b []byte) error {
    97  	m.ctrl.T.Helper()
    98  	ret := m.ctrl.Call(m, "Write", connIndex, b)
    99  	ret0, _ := ret[0].(error)
   100  	return ret0
   101  }
   102  
   103  // Write indicates an expected call of Write.
   104  func (mr *MockconsumerWriterMockRecorder) Write(connIndex, b interface{}) *gomock.Call {
   105  	mr.mock.ctrl.T.Helper()
   106  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockconsumerWriter)(nil).Write), connIndex, b)
   107  }
   108  
   109  // MockkeepAlivable is a mock of keepAlivable interface.
   110  type MockkeepAlivable struct {
   111  	ctrl     *gomock.Controller
   112  	recorder *MockkeepAlivableMockRecorder
   113  }
   114  
   115  // MockkeepAlivableMockRecorder is the mock recorder for MockkeepAlivable.
   116  type MockkeepAlivableMockRecorder struct {
   117  	mock *MockkeepAlivable
   118  }
   119  
   120  // NewMockkeepAlivable creates a new mock instance.
   121  func NewMockkeepAlivable(ctrl *gomock.Controller) *MockkeepAlivable {
   122  	mock := &MockkeepAlivable{ctrl: ctrl}
   123  	mock.recorder = &MockkeepAlivableMockRecorder{mock}
   124  	return mock
   125  }
   126  
   127  // EXPECT returns an object that allows the caller to indicate expected use.
   128  func (m *MockkeepAlivable) EXPECT() *MockkeepAlivableMockRecorder {
   129  	return m.recorder
   130  }
   131  
   132  // SetKeepAlive mocks base method.
   133  func (m *MockkeepAlivable) SetKeepAlive(shouldKeepAlive bool) error {
   134  	m.ctrl.T.Helper()
   135  	ret := m.ctrl.Call(m, "SetKeepAlive", shouldKeepAlive)
   136  	ret0, _ := ret[0].(error)
   137  	return ret0
   138  }
   139  
   140  // SetKeepAlive indicates an expected call of SetKeepAlive.
   141  func (mr *MockkeepAlivableMockRecorder) SetKeepAlive(shouldKeepAlive interface{}) *gomock.Call {
   142  	mr.mock.ctrl.T.Helper()
   143  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetKeepAlive", reflect.TypeOf((*MockkeepAlivable)(nil).SetKeepAlive), shouldKeepAlive)
   144  }
   145  
   146  // SetKeepAlivePeriod mocks base method.
   147  func (m *MockkeepAlivable) SetKeepAlivePeriod(d time.Duration) error {
   148  	m.ctrl.T.Helper()
   149  	ret := m.ctrl.Call(m, "SetKeepAlivePeriod", d)
   150  	ret0, _ := ret[0].(error)
   151  	return ret0
   152  }
   153  
   154  // SetKeepAlivePeriod indicates an expected call of SetKeepAlivePeriod.
   155  func (mr *MockkeepAlivableMockRecorder) SetKeepAlivePeriod(d interface{}) *gomock.Call {
   156  	mr.mock.ctrl.T.Helper()
   157  	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetKeepAlivePeriod", reflect.TypeOf((*MockkeepAlivable)(nil).SetKeepAlivePeriod), d)
   158  }