github.com/koko1123/flow-go-1@v0.29.6/module/mock/lib_p2_p_metrics.go (about)

     1  // Code generated by mockery v2.13.1. DO NOT EDIT.
     2  
     3  package mock
     4  
     5  import (
     6  	mock "github.com/stretchr/testify/mock"
     7  
     8  	network "github.com/libp2p/go-libp2p/core/network"
     9  
    10  	peer "github.com/libp2p/go-libp2p/core/peer"
    11  
    12  	protocol "github.com/libp2p/go-libp2p/core/protocol"
    13  
    14  	time "time"
    15  )
    16  
    17  // LibP2PMetrics is an autogenerated mock type for the LibP2PMetrics type
    18  type LibP2PMetrics struct {
    19  	mock.Mock
    20  }
    21  
    22  // AllowConn provides a mock function with given fields: dir, usefd
    23  func (_m *LibP2PMetrics) AllowConn(dir network.Direction, usefd bool) {
    24  	_m.Called(dir, usefd)
    25  }
    26  
    27  // AllowMemory provides a mock function with given fields: size
    28  func (_m *LibP2PMetrics) AllowMemory(size int) {
    29  	_m.Called(size)
    30  }
    31  
    32  // AllowPeer provides a mock function with given fields: p
    33  func (_m *LibP2PMetrics) AllowPeer(p peer.ID) {
    34  	_m.Called(p)
    35  }
    36  
    37  // AllowProtocol provides a mock function with given fields: proto
    38  func (_m *LibP2PMetrics) AllowProtocol(proto protocol.ID) {
    39  	_m.Called(proto)
    40  }
    41  
    42  // AllowService provides a mock function with given fields: svc
    43  func (_m *LibP2PMetrics) AllowService(svc string) {
    44  	_m.Called(svc)
    45  }
    46  
    47  // AllowStream provides a mock function with given fields: p, dir
    48  func (_m *LibP2PMetrics) AllowStream(p peer.ID, dir network.Direction) {
    49  	_m.Called(p, dir)
    50  }
    51  
    52  // BlockConn provides a mock function with given fields: dir, usefd
    53  func (_m *LibP2PMetrics) BlockConn(dir network.Direction, usefd bool) {
    54  	_m.Called(dir, usefd)
    55  }
    56  
    57  // BlockMemory provides a mock function with given fields: size
    58  func (_m *LibP2PMetrics) BlockMemory(size int) {
    59  	_m.Called(size)
    60  }
    61  
    62  // BlockPeer provides a mock function with given fields: p
    63  func (_m *LibP2PMetrics) BlockPeer(p peer.ID) {
    64  	_m.Called(p)
    65  }
    66  
    67  // BlockProtocol provides a mock function with given fields: proto
    68  func (_m *LibP2PMetrics) BlockProtocol(proto protocol.ID) {
    69  	_m.Called(proto)
    70  }
    71  
    72  // BlockProtocolPeer provides a mock function with given fields: proto, p
    73  func (_m *LibP2PMetrics) BlockProtocolPeer(proto protocol.ID, p peer.ID) {
    74  	_m.Called(proto, p)
    75  }
    76  
    77  // BlockService provides a mock function with given fields: svc
    78  func (_m *LibP2PMetrics) BlockService(svc string) {
    79  	_m.Called(svc)
    80  }
    81  
    82  // BlockServicePeer provides a mock function with given fields: svc, p
    83  func (_m *LibP2PMetrics) BlockServicePeer(svc string, p peer.ID) {
    84  	_m.Called(svc, p)
    85  }
    86  
    87  // BlockStream provides a mock function with given fields: p, dir
    88  func (_m *LibP2PMetrics) BlockStream(p peer.ID, dir network.Direction) {
    89  	_m.Called(p, dir)
    90  }
    91  
    92  // DNSLookupDuration provides a mock function with given fields: duration
    93  func (_m *LibP2PMetrics) DNSLookupDuration(duration time.Duration) {
    94  	_m.Called(duration)
    95  }
    96  
    97  // InboundConnections provides a mock function with given fields: connectionCount
    98  func (_m *LibP2PMetrics) InboundConnections(connectionCount uint) {
    99  	_m.Called(connectionCount)
   100  }
   101  
   102  // OnDNSCacheHit provides a mock function with given fields:
   103  func (_m *LibP2PMetrics) OnDNSCacheHit() {
   104  	_m.Called()
   105  }
   106  
   107  // OnDNSCacheInvalidated provides a mock function with given fields:
   108  func (_m *LibP2PMetrics) OnDNSCacheInvalidated() {
   109  	_m.Called()
   110  }
   111  
   112  // OnDNSCacheMiss provides a mock function with given fields:
   113  func (_m *LibP2PMetrics) OnDNSCacheMiss() {
   114  	_m.Called()
   115  }
   116  
   117  // OnDNSLookupRequestDropped provides a mock function with given fields:
   118  func (_m *LibP2PMetrics) OnDNSLookupRequestDropped() {
   119  	_m.Called()
   120  }
   121  
   122  // OnGraftReceived provides a mock function with given fields: count
   123  func (_m *LibP2PMetrics) OnGraftReceived(count int) {
   124  	_m.Called(count)
   125  }
   126  
   127  // OnIHaveReceived provides a mock function with given fields: count
   128  func (_m *LibP2PMetrics) OnIHaveReceived(count int) {
   129  	_m.Called(count)
   130  }
   131  
   132  // OnIWantReceived provides a mock function with given fields: count
   133  func (_m *LibP2PMetrics) OnIWantReceived(count int) {
   134  	_m.Called(count)
   135  }
   136  
   137  // OnIncomingRpcAcceptedFully provides a mock function with given fields:
   138  func (_m *LibP2PMetrics) OnIncomingRpcAcceptedFully() {
   139  	_m.Called()
   140  }
   141  
   142  // OnIncomingRpcAcceptedOnlyForControlMessages provides a mock function with given fields:
   143  func (_m *LibP2PMetrics) OnIncomingRpcAcceptedOnlyForControlMessages() {
   144  	_m.Called()
   145  }
   146  
   147  // OnIncomingRpcRejected provides a mock function with given fields:
   148  func (_m *LibP2PMetrics) OnIncomingRpcRejected() {
   149  	_m.Called()
   150  }
   151  
   152  // OnPruneReceived provides a mock function with given fields: count
   153  func (_m *LibP2PMetrics) OnPruneReceived(count int) {
   154  	_m.Called(count)
   155  }
   156  
   157  // OnPublishedGossipMessagesReceived provides a mock function with given fields: count
   158  func (_m *LibP2PMetrics) OnPublishedGossipMessagesReceived(count int) {
   159  	_m.Called(count)
   160  }
   161  
   162  // OutboundConnections provides a mock function with given fields: connectionCount
   163  func (_m *LibP2PMetrics) OutboundConnections(connectionCount uint) {
   164  	_m.Called(connectionCount)
   165  }
   166  
   167  // RoutingTablePeerAdded provides a mock function with given fields:
   168  func (_m *LibP2PMetrics) RoutingTablePeerAdded() {
   169  	_m.Called()
   170  }
   171  
   172  // RoutingTablePeerRemoved provides a mock function with given fields:
   173  func (_m *LibP2PMetrics) RoutingTablePeerRemoved() {
   174  	_m.Called()
   175  }
   176  
   177  type mockConstructorTestingTNewLibP2PMetrics interface {
   178  	mock.TestingT
   179  	Cleanup(func())
   180  }
   181  
   182  // NewLibP2PMetrics creates a new instance of LibP2PMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   183  func NewLibP2PMetrics(t mockConstructorTestingTNewLibP2PMetrics) *LibP2PMetrics {
   184  	mock := &LibP2PMetrics{}
   185  	mock.Mock.Test(t)
   186  
   187  	t.Cleanup(func() { mock.AssertExpectations(t) })
   188  
   189  	return mock
   190  }