-
Notifications
You must be signed in to change notification settings - Fork 175
/
gossip_sub_rpc_validation_inspector_metrics.go
151 lines (118 loc) · 6.33 KB
/
gossip_sub_rpc_validation_inspector_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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
// Code generated by mockery v2.21.4. DO NOT EDIT.
package mock
import (
mock "github.com/stretchr/testify/mock"
p2pmsg "github.com/onflow/flow-go/network/p2p/message"
time "time"
)
// GossipSubRpcValidationInspectorMetrics is an autogenerated mock type for the GossipSubRpcValidationInspectorMetrics type
type GossipSubRpcValidationInspectorMetrics struct {
mock.Mock
}
// AsyncProcessingFinished provides a mock function with given fields: duration
func (_m *GossipSubRpcValidationInspectorMetrics) AsyncProcessingFinished(duration time.Duration) {
_m.Called(duration)
}
// AsyncProcessingStarted provides a mock function with given fields:
func (_m *GossipSubRpcValidationInspectorMetrics) AsyncProcessingStarted() {
_m.Called()
}
// OnActiveClusterIDsNotSetErr provides a mock function with given fields:
func (_m *GossipSubRpcValidationInspectorMetrics) OnActiveClusterIDsNotSetErr() {
_m.Called()
}
// OnControlMessagesTruncated provides a mock function with given fields: messageType, diff
func (_m *GossipSubRpcValidationInspectorMetrics) OnControlMessagesTruncated(messageType p2pmsg.ControlMessageType, diff int) {
_m.Called(messageType, diff)
}
// OnGraftDuplicateTopicIdsExceedThreshold provides a mock function with given fields:
func (_m *GossipSubRpcValidationInspectorMetrics) OnGraftDuplicateTopicIdsExceedThreshold() {
_m.Called()
}
// OnGraftMessageInspected provides a mock function with given fields: duplicateTopicIds
func (_m *GossipSubRpcValidationInspectorMetrics) OnGraftMessageInspected(duplicateTopicIds int) {
_m.Called(duplicateTopicIds)
}
// OnIHaveControlMessageIdsTruncated provides a mock function with given fields: diff
func (_m *GossipSubRpcValidationInspectorMetrics) OnIHaveControlMessageIdsTruncated(diff int) {
_m.Called(diff)
}
// OnIHaveDuplicateMessageIdsExceedThreshold provides a mock function with given fields:
func (_m *GossipSubRpcValidationInspectorMetrics) OnIHaveDuplicateMessageIdsExceedThreshold() {
_m.Called()
}
// OnIHaveDuplicateTopicIdsExceedThreshold provides a mock function with given fields:
func (_m *GossipSubRpcValidationInspectorMetrics) OnIHaveDuplicateTopicIdsExceedThreshold() {
_m.Called()
}
// OnIHaveMessageIDsReceived provides a mock function with given fields: channel, msgIdCount
func (_m *GossipSubRpcValidationInspectorMetrics) OnIHaveMessageIDsReceived(channel string, msgIdCount int) {
_m.Called(channel, msgIdCount)
}
// OnIHaveMessagesInspected provides a mock function with given fields: duplicateTopicIds, duplicateMessageIds
func (_m *GossipSubRpcValidationInspectorMetrics) OnIHaveMessagesInspected(duplicateTopicIds int, duplicateMessageIds int) {
_m.Called(duplicateTopicIds, duplicateMessageIds)
}
// OnIWantCacheMissMessageIdsExceedThreshold provides a mock function with given fields:
func (_m *GossipSubRpcValidationInspectorMetrics) OnIWantCacheMissMessageIdsExceedThreshold() {
_m.Called()
}
// OnIWantControlMessageIdsTruncated provides a mock function with given fields: diff
func (_m *GossipSubRpcValidationInspectorMetrics) OnIWantControlMessageIdsTruncated(diff int) {
_m.Called(diff)
}
// OnIWantDuplicateMessageIdsExceedThreshold provides a mock function with given fields:
func (_m *GossipSubRpcValidationInspectorMetrics) OnIWantDuplicateMessageIdsExceedThreshold() {
_m.Called()
}
// OnIWantMessageIDsReceived provides a mock function with given fields: msgIdCount
func (_m *GossipSubRpcValidationInspectorMetrics) OnIWantMessageIDsReceived(msgIdCount int) {
_m.Called(msgIdCount)
}
// OnIWantMessagesInspected provides a mock function with given fields: duplicateCount, cacheMissCount
func (_m *GossipSubRpcValidationInspectorMetrics) OnIWantMessagesInspected(duplicateCount int, cacheMissCount int) {
_m.Called(duplicateCount, cacheMissCount)
}
// OnIncomingRpcReceived provides a mock function with given fields: iHaveCount, iWantCount, graftCount, pruneCount, msgCount
func (_m *GossipSubRpcValidationInspectorMetrics) OnIncomingRpcReceived(iHaveCount int, iWantCount int, graftCount int, pruneCount int, msgCount int) {
_m.Called(iHaveCount, iWantCount, graftCount, pruneCount, msgCount)
}
// OnInvalidControlMessageNotificationSent provides a mock function with given fields:
func (_m *GossipSubRpcValidationInspectorMetrics) OnInvalidControlMessageNotificationSent() {
_m.Called()
}
// OnInvalidTopicIdDetectedForControlMessage provides a mock function with given fields: messageType
func (_m *GossipSubRpcValidationInspectorMetrics) OnInvalidTopicIdDetectedForControlMessage(messageType p2pmsg.ControlMessageType) {
_m.Called(messageType)
}
// OnPruneDuplicateTopicIdsExceedThreshold provides a mock function with given fields:
func (_m *GossipSubRpcValidationInspectorMetrics) OnPruneDuplicateTopicIdsExceedThreshold() {
_m.Called()
}
// OnPruneMessageInspected provides a mock function with given fields: duplicateTopicIds
func (_m *GossipSubRpcValidationInspectorMetrics) OnPruneMessageInspected(duplicateTopicIds int) {
_m.Called(duplicateTopicIds)
}
// OnPublishMessageInspected provides a mock function with given fields: totalErrCount, invalidTopicIdsCount, invalidSubscriptionsCount, invalidSendersCount
func (_m *GossipSubRpcValidationInspectorMetrics) OnPublishMessageInspected(totalErrCount int, invalidTopicIdsCount int, invalidSubscriptionsCount int, invalidSendersCount int) {
_m.Called(totalErrCount, invalidTopicIdsCount, invalidSubscriptionsCount, invalidSendersCount)
}
// OnPublishMessagesInspectionErrorExceedsThreshold provides a mock function with given fields:
func (_m *GossipSubRpcValidationInspectorMetrics) OnPublishMessagesInspectionErrorExceedsThreshold() {
_m.Called()
}
// OnUnstakedPeerInspectionFailed provides a mock function with given fields:
func (_m *GossipSubRpcValidationInspectorMetrics) OnUnstakedPeerInspectionFailed() {
_m.Called()
}
type mockConstructorTestingTNewGossipSubRpcValidationInspectorMetrics interface {
mock.TestingT
Cleanup(func())
}
// NewGossipSubRpcValidationInspectorMetrics creates a new instance of GossipSubRpcValidationInspectorMetrics. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewGossipSubRpcValidationInspectorMetrics(t mockConstructorTestingTNewGossipSubRpcValidationInspectorMetrics) *GossipSubRpcValidationInspectorMetrics {
mock := &GossipSubRpcValidationInspectorMetrics{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}