go.uber.org/yarpc@v1.72.1/api/peer/peertest/transport.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: go.uber.org/yarpc/api/peer (interfaces: Transport,Subscriber) 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 gomock "github.com/golang/mock/gomock" 29 peer "go.uber.org/yarpc/api/peer" 30 reflect "reflect" 31 ) 32 33 // MockTransport is a mock of Transport interface 34 type MockTransport struct { 35 ctrl *gomock.Controller 36 recorder *MockTransportMockRecorder 37 } 38 39 // MockTransportMockRecorder is the mock recorder for MockTransport 40 type MockTransportMockRecorder struct { 41 mock *MockTransport 42 } 43 44 // NewMockTransport creates a new mock instance 45 func NewMockTransport(ctrl *gomock.Controller) *MockTransport { 46 mock := &MockTransport{ctrl: ctrl} 47 mock.recorder = &MockTransportMockRecorder{mock} 48 return mock 49 } 50 51 // EXPECT returns an object that allows the caller to indicate expected use 52 func (m *MockTransport) EXPECT() *MockTransportMockRecorder { 53 return m.recorder 54 } 55 56 // ReleasePeer mocks base method 57 func (m *MockTransport) ReleasePeer(arg0 peer.Identifier, arg1 peer.Subscriber) error { 58 m.ctrl.T.Helper() 59 ret := m.ctrl.Call(m, "ReleasePeer", arg0, arg1) 60 ret0, _ := ret[0].(error) 61 return ret0 62 } 63 64 // ReleasePeer indicates an expected call of ReleasePeer 65 func (mr *MockTransportMockRecorder) ReleasePeer(arg0, arg1 interface{}) *gomock.Call { 66 mr.mock.ctrl.T.Helper() 67 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReleasePeer", reflect.TypeOf((*MockTransport)(nil).ReleasePeer), arg0, arg1) 68 } 69 70 // RetainPeer mocks base method 71 func (m *MockTransport) RetainPeer(arg0 peer.Identifier, arg1 peer.Subscriber) (peer.Peer, error) { 72 m.ctrl.T.Helper() 73 ret := m.ctrl.Call(m, "RetainPeer", arg0, arg1) 74 ret0, _ := ret[0].(peer.Peer) 75 ret1, _ := ret[1].(error) 76 return ret0, ret1 77 } 78 79 // RetainPeer indicates an expected call of RetainPeer 80 func (mr *MockTransportMockRecorder) RetainPeer(arg0, arg1 interface{}) *gomock.Call { 81 mr.mock.ctrl.T.Helper() 82 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RetainPeer", reflect.TypeOf((*MockTransport)(nil).RetainPeer), arg0, arg1) 83 } 84 85 // MockSubscriber is a mock of Subscriber interface 86 type MockSubscriber struct { 87 ctrl *gomock.Controller 88 recorder *MockSubscriberMockRecorder 89 } 90 91 // MockSubscriberMockRecorder is the mock recorder for MockSubscriber 92 type MockSubscriberMockRecorder struct { 93 mock *MockSubscriber 94 } 95 96 // NewMockSubscriber creates a new mock instance 97 func NewMockSubscriber(ctrl *gomock.Controller) *MockSubscriber { 98 mock := &MockSubscriber{ctrl: ctrl} 99 mock.recorder = &MockSubscriberMockRecorder{mock} 100 return mock 101 } 102 103 // EXPECT returns an object that allows the caller to indicate expected use 104 func (m *MockSubscriber) EXPECT() *MockSubscriberMockRecorder { 105 return m.recorder 106 } 107 108 // NotifyStatusChanged mocks base method 109 func (m *MockSubscriber) NotifyStatusChanged(arg0 peer.Identifier) { 110 m.ctrl.T.Helper() 111 m.ctrl.Call(m, "NotifyStatusChanged", arg0) 112 } 113 114 // NotifyStatusChanged indicates an expected call of NotifyStatusChanged 115 func (mr *MockSubscriberMockRecorder) NotifyStatusChanged(arg0 interface{}) *gomock.Call { 116 mr.mock.ctrl.T.Helper() 117 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NotifyStatusChanged", reflect.TypeOf((*MockSubscriber)(nil).NotifyStatusChanged), arg0) 118 }