github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/network/p2p/mock/rate_limiter_consumer.go (about) 1 // Code generated by mockery v2.21.4. DO NOT EDIT. 2 3 package mockp2p 4 5 import ( 6 mock "github.com/stretchr/testify/mock" 7 8 peer "github.com/libp2p/go-libp2p/core/peer" 9 ) 10 11 // RateLimiterConsumer is an autogenerated mock type for the RateLimiterConsumer type 12 type RateLimiterConsumer struct { 13 mock.Mock 14 } 15 16 // OnRateLimitedPeer provides a mock function with given fields: pid, role, msgType, topic, reason 17 func (_m *RateLimiterConsumer) OnRateLimitedPeer(pid peer.ID, role string, msgType string, topic string, reason string) { 18 _m.Called(pid, role, msgType, topic, reason) 19 } 20 21 type mockConstructorTestingTNewRateLimiterConsumer interface { 22 mock.TestingT 23 Cleanup(func()) 24 } 25 26 // NewRateLimiterConsumer creates a new instance of RateLimiterConsumer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 27 func NewRateLimiterConsumer(t mockConstructorTestingTNewRateLimiterConsumer) *RateLimiterConsumer { 28 mock := &RateLimiterConsumer{} 29 mock.Mock.Test(t) 30 31 t.Cleanup(func() { mock.AssertExpectations(t) }) 32 33 return mock 34 }