-
Notifications
You must be signed in to change notification settings - Fork 175
/
gossip_sub_metrics.go
130 lines (102 loc) · 4.06 KB
/
gossip_sub_metrics.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
// Code generated by mockery v2.21.4. DO NOT EDIT.
package mock
import (
channels "github.com/onflow/flow-go/network/channels"
mock "github.com/stretchr/testify/mock"
time "time"
)
// GossipSubMetrics is an autogenerated mock type for the GossipSubMetrics type
type GossipSubMetrics struct {
mock.Mock
}
// AsyncProcessingFinished provides a mock function with given fields: duration
func (_m *GossipSubMetrics) AsyncProcessingFinished(duration time.Duration) {
_m.Called(duration)
}
// AsyncProcessingStarted provides a mock function with given fields:
func (_m *GossipSubMetrics) AsyncProcessingStarted() {
_m.Called()
}
// OnAppSpecificScoreUpdated provides a mock function with given fields: _a0
func (_m *GossipSubMetrics) OnAppSpecificScoreUpdated(_a0 float64) {
_m.Called(_a0)
}
// OnBehaviourPenaltyUpdated provides a mock function with given fields: _a0
func (_m *GossipSubMetrics) OnBehaviourPenaltyUpdated(_a0 float64) {
_m.Called(_a0)
}
// OnFirstMessageDeliveredUpdated provides a mock function with given fields: _a0, _a1
func (_m *GossipSubMetrics) OnFirstMessageDeliveredUpdated(_a0 channels.Topic, _a1 float64) {
_m.Called(_a0, _a1)
}
// OnGraftReceived provides a mock function with given fields: count
func (_m *GossipSubMetrics) OnGraftReceived(count int) {
_m.Called(count)
}
// OnIHaveReceived provides a mock function with given fields: count
func (_m *GossipSubMetrics) OnIHaveReceived(count int) {
_m.Called(count)
}
// OnIPColocationFactorUpdated provides a mock function with given fields: _a0
func (_m *GossipSubMetrics) OnIPColocationFactorUpdated(_a0 float64) {
_m.Called(_a0)
}
// OnIWantReceived provides a mock function with given fields: count
func (_m *GossipSubMetrics) OnIWantReceived(count int) {
_m.Called(count)
}
// OnIncomingRpcAcceptedFully provides a mock function with given fields:
func (_m *GossipSubMetrics) OnIncomingRpcAcceptedFully() {
_m.Called()
}
// OnIncomingRpcAcceptedOnlyForControlMessages provides a mock function with given fields:
func (_m *GossipSubMetrics) OnIncomingRpcAcceptedOnlyForControlMessages() {
_m.Called()
}
// OnIncomingRpcRejected provides a mock function with given fields:
func (_m *GossipSubMetrics) OnIncomingRpcRejected() {
_m.Called()
}
// OnInvalidMessageDeliveredUpdated provides a mock function with given fields: _a0, _a1
func (_m *GossipSubMetrics) OnInvalidMessageDeliveredUpdated(_a0 channels.Topic, _a1 float64) {
_m.Called(_a0, _a1)
}
// OnLocalMeshSizeUpdated provides a mock function with given fields: topic, size
func (_m *GossipSubMetrics) OnLocalMeshSizeUpdated(topic string, size int) {
_m.Called(topic, size)
}
// OnMeshMessageDeliveredUpdated provides a mock function with given fields: _a0, _a1
func (_m *GossipSubMetrics) OnMeshMessageDeliveredUpdated(_a0 channels.Topic, _a1 float64) {
_m.Called(_a0, _a1)
}
// OnOverallPeerScoreUpdated provides a mock function with given fields: _a0
func (_m *GossipSubMetrics) OnOverallPeerScoreUpdated(_a0 float64) {
_m.Called(_a0)
}
// OnPruneReceived provides a mock function with given fields: count
func (_m *GossipSubMetrics) OnPruneReceived(count int) {
_m.Called(count)
}
// OnPublishedGossipMessagesReceived provides a mock function with given fields: count
func (_m *GossipSubMetrics) OnPublishedGossipMessagesReceived(count int) {
_m.Called(count)
}
// OnTimeInMeshUpdated provides a mock function with given fields: _a0, _a1
func (_m *GossipSubMetrics) OnTimeInMeshUpdated(_a0 channels.Topic, _a1 time.Duration) {
_m.Called(_a0, _a1)
}
// SetWarningStateCount provides a mock function with given fields: _a0
func (_m *GossipSubMetrics) SetWarningStateCount(_a0 uint) {
_m.Called(_a0)
}
type mockConstructorTestingTNewGossipSubMetrics interface {
mock.TestingT
Cleanup(func())
}
// NewGossipSubMetrics creates a new instance of GossipSubMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewGossipSubMetrics(t mockConstructorTestingTNewGossipSubMetrics) *GossipSubMetrics {
mock := &GossipSubMetrics{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}