github.com/onflow/flow-go@v0.33.17/network/p2p/mock/gossip_sub_inspector_notif_distributor.go (about)

     1  // Code generated by mockery v2.21.4. DO NOT EDIT.
     2  
     3  package mockp2p
     4  
     5  import (
     6  	irrecoverable "github.com/onflow/flow-go/module/irrecoverable"
     7  	mock "github.com/stretchr/testify/mock"
     8  
     9  	p2p "github.com/onflow/flow-go/network/p2p"
    10  )
    11  
    12  // GossipSubInspectorNotifDistributor is an autogenerated mock type for the GossipSubInspectorNotifDistributor type
    13  type GossipSubInspectorNotifDistributor struct {
    14  	mock.Mock
    15  }
    16  
    17  // AddConsumer provides a mock function with given fields: _a0
    18  func (_m *GossipSubInspectorNotifDistributor) AddConsumer(_a0 p2p.GossipSubInvCtrlMsgNotifConsumer) {
    19  	_m.Called(_a0)
    20  }
    21  
    22  // Distribute provides a mock function with given fields: notification
    23  func (_m *GossipSubInspectorNotifDistributor) Distribute(notification *p2p.InvCtrlMsgNotif) error {
    24  	ret := _m.Called(notification)
    25  
    26  	var r0 error
    27  	if rf, ok := ret.Get(0).(func(*p2p.InvCtrlMsgNotif) error); ok {
    28  		r0 = rf(notification)
    29  	} else {
    30  		r0 = ret.Error(0)
    31  	}
    32  
    33  	return r0
    34  }
    35  
    36  // Done provides a mock function with given fields:
    37  func (_m *GossipSubInspectorNotifDistributor) Done() <-chan struct{} {
    38  	ret := _m.Called()
    39  
    40  	var r0 <-chan struct{}
    41  	if rf, ok := ret.Get(0).(func() <-chan struct{}); ok {
    42  		r0 = rf()
    43  	} else {
    44  		if ret.Get(0) != nil {
    45  			r0 = ret.Get(0).(<-chan struct{})
    46  		}
    47  	}
    48  
    49  	return r0
    50  }
    51  
    52  // Ready provides a mock function with given fields:
    53  func (_m *GossipSubInspectorNotifDistributor) Ready() <-chan struct{} {
    54  	ret := _m.Called()
    55  
    56  	var r0 <-chan struct{}
    57  	if rf, ok := ret.Get(0).(func() <-chan struct{}); ok {
    58  		r0 = rf()
    59  	} else {
    60  		if ret.Get(0) != nil {
    61  			r0 = ret.Get(0).(<-chan struct{})
    62  		}
    63  	}
    64  
    65  	return r0
    66  }
    67  
    68  // Start provides a mock function with given fields: _a0
    69  func (_m *GossipSubInspectorNotifDistributor) Start(_a0 irrecoverable.SignalerContext) {
    70  	_m.Called(_a0)
    71  }
    72  
    73  type mockConstructorTestingTNewGossipSubInspectorNotifDistributor interface {
    74  	mock.TestingT
    75  	Cleanup(func())
    76  }
    77  
    78  // NewGossipSubInspectorNotifDistributor creates a new instance of GossipSubInspectorNotifDistributor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
    79  func NewGossipSubInspectorNotifDistributor(t mockConstructorTestingTNewGossipSubInspectorNotifDistributor) *GossipSubInspectorNotifDistributor {
    80  	mock := &GossipSubInspectorNotifDistributor{}
    81  	mock.Mock.Test(t)
    82  
    83  	t.Cleanup(func() { mock.AssertExpectations(t) })
    84  
    85  	return mock
    86  }