github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/network/mocknetwork/engine_registry.go (about) 1 // Code generated by mockery v2.21.4. DO NOT EDIT. 2 3 package mocknetwork 4 5 import ( 6 datastore "github.com/ipfs/go-datastore" 7 channels "github.com/onflow/flow-go/network/channels" 8 9 irrecoverable "github.com/onflow/flow-go/module/irrecoverable" 10 11 mock "github.com/stretchr/testify/mock" 12 13 network "github.com/onflow/flow-go/network" 14 15 protocol "github.com/libp2p/go-libp2p/core/protocol" 16 ) 17 18 // EngineRegistry is an autogenerated mock type for the EngineRegistry type 19 type EngineRegistry struct { 20 mock.Mock 21 } 22 23 // Done provides a mock function with given fields: 24 func (_m *EngineRegistry) Done() <-chan struct{} { 25 ret := _m.Called() 26 27 var r0 <-chan struct{} 28 if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { 29 r0 = rf() 30 } else { 31 if ret.Get(0) != nil { 32 r0 = ret.Get(0).(<-chan struct{}) 33 } 34 } 35 36 return r0 37 } 38 39 // Ready provides a mock function with given fields: 40 func (_m *EngineRegistry) Ready() <-chan struct{} { 41 ret := _m.Called() 42 43 var r0 <-chan struct{} 44 if rf, ok := ret.Get(0).(func() <-chan struct{}); ok { 45 r0 = rf() 46 } else { 47 if ret.Get(0) != nil { 48 r0 = ret.Get(0).(<-chan struct{}) 49 } 50 } 51 52 return r0 53 } 54 55 // Register provides a mock function with given fields: channel, messageProcessor 56 func (_m *EngineRegistry) Register(channel channels.Channel, messageProcessor network.MessageProcessor) (network.Conduit, error) { 57 ret := _m.Called(channel, messageProcessor) 58 59 var r0 network.Conduit 60 var r1 error 61 if rf, ok := ret.Get(0).(func(channels.Channel, network.MessageProcessor) (network.Conduit, error)); ok { 62 return rf(channel, messageProcessor) 63 } 64 if rf, ok := ret.Get(0).(func(channels.Channel, network.MessageProcessor) network.Conduit); ok { 65 r0 = rf(channel, messageProcessor) 66 } else { 67 if ret.Get(0) != nil { 68 r0 = ret.Get(0).(network.Conduit) 69 } 70 } 71 72 if rf, ok := ret.Get(1).(func(channels.Channel, network.MessageProcessor) error); ok { 73 r1 = rf(channel, messageProcessor) 74 } else { 75 r1 = ret.Error(1) 76 } 77 78 return r0, r1 79 } 80 81 // RegisterBlobService provides a mock function with given fields: channel, store, opts 82 func (_m *EngineRegistry) RegisterBlobService(channel channels.Channel, store datastore.Batching, opts ...network.BlobServiceOption) (network.BlobService, error) { 83 _va := make([]interface{}, len(opts)) 84 for _i := range opts { 85 _va[_i] = opts[_i] 86 } 87 var _ca []interface{} 88 _ca = append(_ca, channel, store) 89 _ca = append(_ca, _va...) 90 ret := _m.Called(_ca...) 91 92 var r0 network.BlobService 93 var r1 error 94 if rf, ok := ret.Get(0).(func(channels.Channel, datastore.Batching, ...network.BlobServiceOption) (network.BlobService, error)); ok { 95 return rf(channel, store, opts...) 96 } 97 if rf, ok := ret.Get(0).(func(channels.Channel, datastore.Batching, ...network.BlobServiceOption) network.BlobService); ok { 98 r0 = rf(channel, store, opts...) 99 } else { 100 if ret.Get(0) != nil { 101 r0 = ret.Get(0).(network.BlobService) 102 } 103 } 104 105 if rf, ok := ret.Get(1).(func(channels.Channel, datastore.Batching, ...network.BlobServiceOption) error); ok { 106 r1 = rf(channel, store, opts...) 107 } else { 108 r1 = ret.Error(1) 109 } 110 111 return r0, r1 112 } 113 114 // RegisterPingService provides a mock function with given fields: pingProtocolID, pingInfoProvider 115 func (_m *EngineRegistry) RegisterPingService(pingProtocolID protocol.ID, pingInfoProvider network.PingInfoProvider) (network.PingService, error) { 116 ret := _m.Called(pingProtocolID, pingInfoProvider) 117 118 var r0 network.PingService 119 var r1 error 120 if rf, ok := ret.Get(0).(func(protocol.ID, network.PingInfoProvider) (network.PingService, error)); ok { 121 return rf(pingProtocolID, pingInfoProvider) 122 } 123 if rf, ok := ret.Get(0).(func(protocol.ID, network.PingInfoProvider) network.PingService); ok { 124 r0 = rf(pingProtocolID, pingInfoProvider) 125 } else { 126 if ret.Get(0) != nil { 127 r0 = ret.Get(0).(network.PingService) 128 } 129 } 130 131 if rf, ok := ret.Get(1).(func(protocol.ID, network.PingInfoProvider) error); ok { 132 r1 = rf(pingProtocolID, pingInfoProvider) 133 } else { 134 r1 = ret.Error(1) 135 } 136 137 return r0, r1 138 } 139 140 // Start provides a mock function with given fields: _a0 141 func (_m *EngineRegistry) Start(_a0 irrecoverable.SignalerContext) { 142 _m.Called(_a0) 143 } 144 145 type mockConstructorTestingTNewEngineRegistry interface { 146 mock.TestingT 147 Cleanup(func()) 148 } 149 150 // NewEngineRegistry creates a new instance of EngineRegistry. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 151 func NewEngineRegistry(t mockConstructorTestingTNewEngineRegistry) *EngineRegistry { 152 mock := &EngineRegistry{} 153 mock.Mock.Test(t) 154 155 t.Cleanup(func() { mock.AssertExpectations(t) }) 156 157 return mock 158 }