github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/module/mock/network_core_metrics.go (about)

     1  // Code generated by mockery v2.21.4. DO NOT EDIT.
     2  
     3  package mock
     4  
     5  import (
     6  	mock "github.com/stretchr/testify/mock"
     7  
     8  	peer "github.com/libp2p/go-libp2p/core/peer"
     9  
    10  	time "time"
    11  )
    12  
    13  // NetworkCoreMetrics is an autogenerated mock type for the NetworkCoreMetrics type
    14  type NetworkCoreMetrics struct {
    15  	mock.Mock
    16  }
    17  
    18  // DuplicateInboundMessagesDropped provides a mock function with given fields: topic, protocol, messageType
    19  func (_m *NetworkCoreMetrics) DuplicateInboundMessagesDropped(topic string, protocol string, messageType string) {
    20  	_m.Called(topic, protocol, messageType)
    21  }
    22  
    23  // InboundMessageReceived provides a mock function with given fields: sizeBytes, topic, protocol, messageType
    24  func (_m *NetworkCoreMetrics) InboundMessageReceived(sizeBytes int, topic string, protocol string, messageType string) {
    25  	_m.Called(sizeBytes, topic, protocol, messageType)
    26  }
    27  
    28  // MessageAdded provides a mock function with given fields: priority
    29  func (_m *NetworkCoreMetrics) MessageAdded(priority int) {
    30  	_m.Called(priority)
    31  }
    32  
    33  // MessageProcessingFinished provides a mock function with given fields: topic, duration
    34  func (_m *NetworkCoreMetrics) MessageProcessingFinished(topic string, duration time.Duration) {
    35  	_m.Called(topic, duration)
    36  }
    37  
    38  // MessageProcessingStarted provides a mock function with given fields: topic
    39  func (_m *NetworkCoreMetrics) MessageProcessingStarted(topic string) {
    40  	_m.Called(topic)
    41  }
    42  
    43  // MessageRemoved provides a mock function with given fields: priority
    44  func (_m *NetworkCoreMetrics) MessageRemoved(priority int) {
    45  	_m.Called(priority)
    46  }
    47  
    48  // OnMisbehaviorReported provides a mock function with given fields: channel, misbehaviorType
    49  func (_m *NetworkCoreMetrics) OnMisbehaviorReported(channel string, misbehaviorType string) {
    50  	_m.Called(channel, misbehaviorType)
    51  }
    52  
    53  // OnRateLimitedPeer provides a mock function with given fields: pid, role, msgType, topic, reason
    54  func (_m *NetworkCoreMetrics) OnRateLimitedPeer(pid peer.ID, role string, msgType string, topic string, reason string) {
    55  	_m.Called(pid, role, msgType, topic, reason)
    56  }
    57  
    58  // OnUnauthorizedMessage provides a mock function with given fields: role, msgType, topic, offense
    59  func (_m *NetworkCoreMetrics) OnUnauthorizedMessage(role string, msgType string, topic string, offense string) {
    60  	_m.Called(role, msgType, topic, offense)
    61  }
    62  
    63  // OnViolationReportSkipped provides a mock function with given fields:
    64  func (_m *NetworkCoreMetrics) OnViolationReportSkipped() {
    65  	_m.Called()
    66  }
    67  
    68  // OutboundMessageSent provides a mock function with given fields: sizeBytes, topic, protocol, messageType
    69  func (_m *NetworkCoreMetrics) OutboundMessageSent(sizeBytes int, topic string, protocol string, messageType string) {
    70  	_m.Called(sizeBytes, topic, protocol, messageType)
    71  }
    72  
    73  // QueueDuration provides a mock function with given fields: duration, priority
    74  func (_m *NetworkCoreMetrics) QueueDuration(duration time.Duration, priority int) {
    75  	_m.Called(duration, priority)
    76  }
    77  
    78  // UnicastMessageSendingCompleted provides a mock function with given fields: topic
    79  func (_m *NetworkCoreMetrics) UnicastMessageSendingCompleted(topic string) {
    80  	_m.Called(topic)
    81  }
    82  
    83  // UnicastMessageSendingStarted provides a mock function with given fields: topic
    84  func (_m *NetworkCoreMetrics) UnicastMessageSendingStarted(topic string) {
    85  	_m.Called(topic)
    86  }
    87  
    88  type mockConstructorTestingTNewNetworkCoreMetrics interface {
    89  	mock.TestingT
    90  	Cleanup(func())
    91  }
    92  
    93  // NewNetworkCoreMetrics creates a new instance of NetworkCoreMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    94  func NewNetworkCoreMetrics(t mockConstructorTestingTNewNetworkCoreMetrics) *NetworkCoreMetrics {
    95  	mock := &NetworkCoreMetrics{}
    96  	mock.Mock.Test(t)
    97  
    98  	t.Cleanup(func() { mock.AssertExpectations(t) })
    99  
   100  	return mock
   101  }