github.com/onflow/flow-go@v0.33.17/network/p2p/mock/pub_sub_adapter_config.go (about) 1 // Code generated by mockery v2.21.4. DO NOT EDIT. 2 3 package mockp2p 4 5 import ( 6 p2p "github.com/onflow/flow-go/network/p2p" 7 mock "github.com/stretchr/testify/mock" 8 9 routing "github.com/libp2p/go-libp2p/core/routing" 10 ) 11 12 // PubSubAdapterConfig is an autogenerated mock type for the PubSubAdapterConfig type 13 type PubSubAdapterConfig struct { 14 mock.Mock 15 } 16 17 // WithInspectorSuite provides a mock function with given fields: _a0 18 func (_m *PubSubAdapterConfig) WithInspectorSuite(_a0 p2p.GossipSubInspectorSuite) { 19 _m.Called(_a0) 20 } 21 22 // WithMessageIdFunction provides a mock function with given fields: f 23 func (_m *PubSubAdapterConfig) WithMessageIdFunction(f func([]byte) string) { 24 _m.Called(f) 25 } 26 27 // WithRoutingDiscovery provides a mock function with given fields: _a0 28 func (_m *PubSubAdapterConfig) WithRoutingDiscovery(_a0 routing.ContentRouting) { 29 _m.Called(_a0) 30 } 31 32 // WithScoreOption provides a mock function with given fields: _a0 33 func (_m *PubSubAdapterConfig) WithScoreOption(_a0 p2p.ScoreOptionBuilder) { 34 _m.Called(_a0) 35 } 36 37 // WithScoreTracer provides a mock function with given fields: tracer 38 func (_m *PubSubAdapterConfig) WithScoreTracer(tracer p2p.PeerScoreTracer) { 39 _m.Called(tracer) 40 } 41 42 // WithSubscriptionFilter provides a mock function with given fields: _a0 43 func (_m *PubSubAdapterConfig) WithSubscriptionFilter(_a0 p2p.SubscriptionFilter) { 44 _m.Called(_a0) 45 } 46 47 // WithTracer provides a mock function with given fields: t 48 func (_m *PubSubAdapterConfig) WithTracer(t p2p.PubSubTracer) { 49 _m.Called(t) 50 } 51 52 type mockConstructorTestingTNewPubSubAdapterConfig interface { 53 mock.TestingT 54 Cleanup(func()) 55 } 56 57 // NewPubSubAdapterConfig creates a new instance of PubSubAdapterConfig. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 58 func NewPubSubAdapterConfig(t mockConstructorTestingTNewPubSubAdapterConfig) *PubSubAdapterConfig { 59 mock := &PubSubAdapterConfig{} 60 mock.Mock.Test(t) 61 62 t.Cleanup(func() { mock.AssertExpectations(t) }) 63 64 return mock 65 }