github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/network/p2p/mock/unicast_rate_limiter_distributor.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  	peer "github.com/libp2p/go-libp2p/core/peer"
    10  )
    11  
    12  // UnicastRateLimiterDistributor is an autogenerated mock type for the UnicastRateLimiterDistributor type
    13  type UnicastRateLimiterDistributor struct {
    14  	mock.Mock
    15  }
    16  
    17  // AddConsumer provides a mock function with given fields: consumer
    18  func (_m *UnicastRateLimiterDistributor) AddConsumer(consumer p2p.RateLimiterConsumer) {
    19  	_m.Called(consumer)
    20  }
    21  
    22  // OnRateLimitedPeer provides a mock function with given fields: pid, role, msgType, topic, reason
    23  func (_m *UnicastRateLimiterDistributor) OnRateLimitedPeer(pid peer.ID, role string, msgType string, topic string, reason string) {
    24  	_m.Called(pid, role, msgType, topic, reason)
    25  }
    26  
    27  type mockConstructorTestingTNewUnicastRateLimiterDistributor interface {
    28  	mock.TestingT
    29  	Cleanup(func())
    30  }
    31  
    32  // NewUnicastRateLimiterDistributor creates a new instance of UnicastRateLimiterDistributor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    33  func NewUnicastRateLimiterDistributor(t mockConstructorTestingTNewUnicastRateLimiterDistributor) *UnicastRateLimiterDistributor {
    34  	mock := &UnicastRateLimiterDistributor{}
    35  	mock.Mock.Test(t)
    36  
    37  	t.Cleanup(func() { mock.AssertExpectations(t) })
    38  
    39  	return mock
    40  }