github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/module/mock/gossip_sub_scoring_metrics.go (about) 1 // Code generated by mockery v2.21.4. DO NOT EDIT. 2 3 package mock 4 5 import ( 6 channels "github.com/onflow/flow-go/network/channels" 7 mock "github.com/stretchr/testify/mock" 8 9 time "time" 10 ) 11 12 // GossipSubScoringMetrics is an autogenerated mock type for the GossipSubScoringMetrics type 13 type GossipSubScoringMetrics struct { 14 mock.Mock 15 } 16 17 // OnAppSpecificScoreUpdated provides a mock function with given fields: _a0 18 func (_m *GossipSubScoringMetrics) OnAppSpecificScoreUpdated(_a0 float64) { 19 _m.Called(_a0) 20 } 21 22 // OnBehaviourPenaltyUpdated provides a mock function with given fields: _a0 23 func (_m *GossipSubScoringMetrics) OnBehaviourPenaltyUpdated(_a0 float64) { 24 _m.Called(_a0) 25 } 26 27 // OnFirstMessageDeliveredUpdated provides a mock function with given fields: _a0, _a1 28 func (_m *GossipSubScoringMetrics) OnFirstMessageDeliveredUpdated(_a0 channels.Topic, _a1 float64) { 29 _m.Called(_a0, _a1) 30 } 31 32 // OnIPColocationFactorUpdated provides a mock function with given fields: _a0 33 func (_m *GossipSubScoringMetrics) OnIPColocationFactorUpdated(_a0 float64) { 34 _m.Called(_a0) 35 } 36 37 // OnInvalidMessageDeliveredUpdated provides a mock function with given fields: _a0, _a1 38 func (_m *GossipSubScoringMetrics) OnInvalidMessageDeliveredUpdated(_a0 channels.Topic, _a1 float64) { 39 _m.Called(_a0, _a1) 40 } 41 42 // OnMeshMessageDeliveredUpdated provides a mock function with given fields: _a0, _a1 43 func (_m *GossipSubScoringMetrics) OnMeshMessageDeliveredUpdated(_a0 channels.Topic, _a1 float64) { 44 _m.Called(_a0, _a1) 45 } 46 47 // OnOverallPeerScoreUpdated provides a mock function with given fields: _a0 48 func (_m *GossipSubScoringMetrics) OnOverallPeerScoreUpdated(_a0 float64) { 49 _m.Called(_a0) 50 } 51 52 // OnTimeInMeshUpdated provides a mock function with given fields: _a0, _a1 53 func (_m *GossipSubScoringMetrics) OnTimeInMeshUpdated(_a0 channels.Topic, _a1 time.Duration) { 54 _m.Called(_a0, _a1) 55 } 56 57 // SetWarningStateCount provides a mock function with given fields: _a0 58 func (_m *GossipSubScoringMetrics) SetWarningStateCount(_a0 uint) { 59 _m.Called(_a0) 60 } 61 62 type mockConstructorTestingTNewGossipSubScoringMetrics interface { 63 mock.TestingT 64 Cleanup(func()) 65 } 66 67 // NewGossipSubScoringMetrics creates a new instance of GossipSubScoringMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 68 func NewGossipSubScoringMetrics(t mockConstructorTestingTNewGossipSubScoringMetrics) *GossipSubScoringMetrics { 69 mock := &GossipSubScoringMetrics{} 70 mock.Mock.Test(t) 71 72 t.Cleanup(func() { mock.AssertExpectations(t) }) 73 74 return mock 75 }