github.com/m3db/m3@v1.5.1-0.20231129193456-75a402aa583b/src/aggregator/client/conn_mock_test.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: net (interfaces: Conn) 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 client is a generated GoMock package. 25 package client 26 27 import ( 28 "net" 29 "reflect" 30 "time" 31 32 "github.com/golang/mock/gomock" 33 ) 34 35 // MockConn is a mock of Conn interface. 36 type MockConn struct { 37 ctrl *gomock.Controller 38 recorder *MockConnMockRecorder 39 } 40 41 // MockConnMockRecorder is the mock recorder for MockConn. 42 type MockConnMockRecorder struct { 43 mock *MockConn 44 } 45 46 // NewMockConn creates a new mock instance. 47 func NewMockConn(ctrl *gomock.Controller) *MockConn { 48 mock := &MockConn{ctrl: ctrl} 49 mock.recorder = &MockConnMockRecorder{mock} 50 return mock 51 } 52 53 // EXPECT returns an object that allows the caller to indicate expected use. 54 func (m *MockConn) EXPECT() *MockConnMockRecorder { 55 return m.recorder 56 } 57 58 // Close mocks base method. 59 func (m *MockConn) Close() error { 60 m.ctrl.T.Helper() 61 ret := m.ctrl.Call(m, "Close") 62 ret0, _ := ret[0].(error) 63 return ret0 64 } 65 66 // Close indicates an expected call of Close. 67 func (mr *MockConnMockRecorder) Close() *gomock.Call { 68 mr.mock.ctrl.T.Helper() 69 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockConn)(nil).Close)) 70 } 71 72 // LocalAddr mocks base method. 73 func (m *MockConn) LocalAddr() net.Addr { 74 m.ctrl.T.Helper() 75 ret := m.ctrl.Call(m, "LocalAddr") 76 ret0, _ := ret[0].(net.Addr) 77 return ret0 78 } 79 80 // LocalAddr indicates an expected call of LocalAddr. 81 func (mr *MockConnMockRecorder) LocalAddr() *gomock.Call { 82 mr.mock.ctrl.T.Helper() 83 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LocalAddr", reflect.TypeOf((*MockConn)(nil).LocalAddr)) 84 } 85 86 // Read mocks base method. 87 func (m *MockConn) Read(arg0 []byte) (int, error) { 88 m.ctrl.T.Helper() 89 ret := m.ctrl.Call(m, "Read", arg0) 90 ret0, _ := ret[0].(int) 91 ret1, _ := ret[1].(error) 92 return ret0, ret1 93 } 94 95 // Read indicates an expected call of Read. 96 func (mr *MockConnMockRecorder) Read(arg0 interface{}) *gomock.Call { 97 mr.mock.ctrl.T.Helper() 98 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Read", reflect.TypeOf((*MockConn)(nil).Read), arg0) 99 } 100 101 // RemoteAddr mocks base method. 102 func (m *MockConn) RemoteAddr() net.Addr { 103 m.ctrl.T.Helper() 104 ret := m.ctrl.Call(m, "RemoteAddr") 105 ret0, _ := ret[0].(net.Addr) 106 return ret0 107 } 108 109 // RemoteAddr indicates an expected call of RemoteAddr. 110 func (mr *MockConnMockRecorder) RemoteAddr() *gomock.Call { 111 mr.mock.ctrl.T.Helper() 112 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoteAddr", reflect.TypeOf((*MockConn)(nil).RemoteAddr)) 113 } 114 115 // SetDeadline mocks base method. 116 func (m *MockConn) SetDeadline(arg0 time.Time) error { 117 m.ctrl.T.Helper() 118 ret := m.ctrl.Call(m, "SetDeadline", arg0) 119 ret0, _ := ret[0].(error) 120 return ret0 121 } 122 123 // SetDeadline indicates an expected call of SetDeadline. 124 func (mr *MockConnMockRecorder) SetDeadline(arg0 interface{}) *gomock.Call { 125 mr.mock.ctrl.T.Helper() 126 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetDeadline", reflect.TypeOf((*MockConn)(nil).SetDeadline), arg0) 127 } 128 129 // SetReadDeadline mocks base method. 130 func (m *MockConn) SetReadDeadline(arg0 time.Time) error { 131 m.ctrl.T.Helper() 132 ret := m.ctrl.Call(m, "SetReadDeadline", arg0) 133 ret0, _ := ret[0].(error) 134 return ret0 135 } 136 137 // SetReadDeadline indicates an expected call of SetReadDeadline. 138 func (mr *MockConnMockRecorder) SetReadDeadline(arg0 interface{}) *gomock.Call { 139 mr.mock.ctrl.T.Helper() 140 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetReadDeadline", reflect.TypeOf((*MockConn)(nil).SetReadDeadline), arg0) 141 } 142 143 // SetWriteDeadline mocks base method. 144 func (m *MockConn) SetWriteDeadline(arg0 time.Time) error { 145 m.ctrl.T.Helper() 146 ret := m.ctrl.Call(m, "SetWriteDeadline", arg0) 147 ret0, _ := ret[0].(error) 148 return ret0 149 } 150 151 // SetWriteDeadline indicates an expected call of SetWriteDeadline. 152 func (mr *MockConnMockRecorder) SetWriteDeadline(arg0 interface{}) *gomock.Call { 153 mr.mock.ctrl.T.Helper() 154 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetWriteDeadline", reflect.TypeOf((*MockConn)(nil).SetWriteDeadline), arg0) 155 } 156 157 // Write mocks base method. 158 func (m *MockConn) Write(arg0 []byte) (int, error) { 159 m.ctrl.T.Helper() 160 ret := m.ctrl.Call(m, "Write", arg0) 161 ret0, _ := ret[0].(int) 162 ret1, _ := ret[1].(error) 163 return ret0, ret1 164 } 165 166 // Write indicates an expected call of Write. 167 func (mr *MockConnMockRecorder) Write(arg0 interface{}) *gomock.Call { 168 mr.mock.ctrl.T.Helper() 169 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*MockConn)(nil).Write), arg0) 170 }