github.com/masterhung0112/hk_server/v5@v5.0.0-20220302090640-ec71aef15e1c/einterfaces/mocks/MetricsInterface.go (about) 1 // Code generated by mockery v1.0.0. DO NOT EDIT. 2 3 // Regenerate this file using `make einterfaces-mocks`. 4 5 package mocks 6 7 import ( 8 logr "github.com/mattermost/logr" 9 mock "github.com/stretchr/testify/mock" 10 ) 11 12 // MetricsInterface is an autogenerated mock type for the MetricsInterface type 13 type MetricsInterface struct { 14 mock.Mock 15 } 16 17 // AddMemCacheHitCounter provides a mock function with given fields: cacheName, amount 18 func (_m *MetricsInterface) AddMemCacheHitCounter(cacheName string, amount float64) { 19 _m.Called(cacheName, amount) 20 } 21 22 // AddMemCacheMissCounter provides a mock function with given fields: cacheName, amount 23 func (_m *MetricsInterface) AddMemCacheMissCounter(cacheName string, amount float64) { 24 _m.Called(cacheName, amount) 25 } 26 27 // DecrementJobActive provides a mock function with given fields: jobType 28 func (_m *MetricsInterface) DecrementJobActive(jobType string) { 29 _m.Called(jobType) 30 } 31 32 // DecrementWebSocketBroadcastBufferSize provides a mock function with given fields: hub, amount 33 func (_m *MetricsInterface) DecrementWebSocketBroadcastBufferSize(hub string, amount float64) { 34 _m.Called(hub, amount) 35 } 36 37 // DecrementWebSocketBroadcastUsersRegistered provides a mock function with given fields: hub, amount 38 func (_m *MetricsInterface) DecrementWebSocketBroadcastUsersRegistered(hub string, amount float64) { 39 _m.Called(hub, amount) 40 } 41 42 // GetLoggerMetricsCollector provides a mock function with given fields: 43 func (_m *MetricsInterface) GetLoggerMetricsCollector() logr.MetricsCollector { 44 ret := _m.Called() 45 46 var r0 logr.MetricsCollector 47 if rf, ok := ret.Get(0).(func() logr.MetricsCollector); ok { 48 r0 = rf() 49 } else { 50 if ret.Get(0) != nil { 51 r0 = ret.Get(0).(logr.MetricsCollector) 52 } 53 } 54 55 return r0 56 } 57 58 // IncrementChannelIndexCounter provides a mock function with given fields: 59 func (_m *MetricsInterface) IncrementChannelIndexCounter() { 60 _m.Called() 61 } 62 63 // IncrementClusterEventType provides a mock function with given fields: eventType 64 func (_m *MetricsInterface) IncrementClusterEventType(eventType string) { 65 _m.Called(eventType) 66 } 67 68 // IncrementClusterRequest provides a mock function with given fields: 69 func (_m *MetricsInterface) IncrementClusterRequest() { 70 _m.Called() 71 } 72 73 // IncrementEtagHitCounter provides a mock function with given fields: route 74 func (_m *MetricsInterface) IncrementEtagHitCounter(route string) { 75 _m.Called(route) 76 } 77 78 // IncrementEtagMissCounter provides a mock function with given fields: route 79 func (_m *MetricsInterface) IncrementEtagMissCounter(route string) { 80 _m.Called(route) 81 } 82 83 // IncrementFileIndexCounter provides a mock function with given fields: 84 func (_m *MetricsInterface) IncrementFileIndexCounter() { 85 _m.Called() 86 } 87 88 // IncrementFilesSearchCounter provides a mock function with given fields: 89 func (_m *MetricsInterface) IncrementFilesSearchCounter() { 90 _m.Called() 91 } 92 93 // IncrementHttpError provides a mock function with given fields: 94 func (_m *MetricsInterface) IncrementHttpError() { 95 _m.Called() 96 } 97 98 // IncrementHttpRequest provides a mock function with given fields: 99 func (_m *MetricsInterface) IncrementHttpRequest() { 100 _m.Called() 101 } 102 103 // IncrementJobActive provides a mock function with given fields: jobType 104 func (_m *MetricsInterface) IncrementJobActive(jobType string) { 105 _m.Called(jobType) 106 } 107 108 // IncrementLogin provides a mock function with given fields: 109 func (_m *MetricsInterface) IncrementLogin() { 110 _m.Called() 111 } 112 113 // IncrementLoginFail provides a mock function with given fields: 114 func (_m *MetricsInterface) IncrementLoginFail() { 115 _m.Called() 116 } 117 118 // IncrementMemCacheHitCounter provides a mock function with given fields: cacheName 119 func (_m *MetricsInterface) IncrementMemCacheHitCounter(cacheName string) { 120 _m.Called(cacheName) 121 } 122 123 // IncrementMemCacheHitCounterSession provides a mock function with given fields: 124 func (_m *MetricsInterface) IncrementMemCacheHitCounterSession() { 125 _m.Called() 126 } 127 128 // IncrementMemCacheInvalidationCounter provides a mock function with given fields: cacheName 129 func (_m *MetricsInterface) IncrementMemCacheInvalidationCounter(cacheName string) { 130 _m.Called(cacheName) 131 } 132 133 // IncrementMemCacheInvalidationCounterSession provides a mock function with given fields: 134 func (_m *MetricsInterface) IncrementMemCacheInvalidationCounterSession() { 135 _m.Called() 136 } 137 138 // IncrementMemCacheMissCounter provides a mock function with given fields: cacheName 139 func (_m *MetricsInterface) IncrementMemCacheMissCounter(cacheName string) { 140 _m.Called(cacheName) 141 } 142 143 // IncrementMemCacheMissCounterSession provides a mock function with given fields: 144 func (_m *MetricsInterface) IncrementMemCacheMissCounterSession() { 145 _m.Called() 146 } 147 148 // IncrementPostBroadcast provides a mock function with given fields: 149 func (_m *MetricsInterface) IncrementPostBroadcast() { 150 _m.Called() 151 } 152 153 // IncrementPostCreate provides a mock function with given fields: 154 func (_m *MetricsInterface) IncrementPostCreate() { 155 _m.Called() 156 } 157 158 // IncrementPostFileAttachment provides a mock function with given fields: count 159 func (_m *MetricsInterface) IncrementPostFileAttachment(count int) { 160 _m.Called(count) 161 } 162 163 // IncrementPostIndexCounter provides a mock function with given fields: 164 func (_m *MetricsInterface) IncrementPostIndexCounter() { 165 _m.Called() 166 } 167 168 // IncrementPostSentEmail provides a mock function with given fields: 169 func (_m *MetricsInterface) IncrementPostSentEmail() { 170 _m.Called() 171 } 172 173 // IncrementPostSentPush provides a mock function with given fields: 174 func (_m *MetricsInterface) IncrementPostSentPush() { 175 _m.Called() 176 } 177 178 // IncrementPostsSearchCounter provides a mock function with given fields: 179 func (_m *MetricsInterface) IncrementPostsSearchCounter() { 180 _m.Called() 181 } 182 183 // IncrementRemoteClusterConnStateChangeCounter provides a mock function with given fields: remoteID, online 184 func (_m *MetricsInterface) IncrementRemoteClusterConnStateChangeCounter(remoteID string, online bool) { 185 _m.Called(remoteID, online) 186 } 187 188 // IncrementRemoteClusterMsgErrorsCounter provides a mock function with given fields: remoteID, timeout 189 func (_m *MetricsInterface) IncrementRemoteClusterMsgErrorsCounter(remoteID string, timeout bool) { 190 _m.Called(remoteID, timeout) 191 } 192 193 // IncrementRemoteClusterMsgReceivedCounter provides a mock function with given fields: remoteID 194 func (_m *MetricsInterface) IncrementRemoteClusterMsgReceivedCounter(remoteID string) { 195 _m.Called(remoteID) 196 } 197 198 // IncrementRemoteClusterMsgSentCounter provides a mock function with given fields: remoteID 199 func (_m *MetricsInterface) IncrementRemoteClusterMsgSentCounter(remoteID string) { 200 _m.Called(remoteID) 201 } 202 203 // IncrementUserIndexCounter provides a mock function with given fields: 204 func (_m *MetricsInterface) IncrementUserIndexCounter() { 205 _m.Called() 206 } 207 208 // IncrementWebSocketBroadcast provides a mock function with given fields: eventType 209 func (_m *MetricsInterface) IncrementWebSocketBroadcast(eventType string) { 210 _m.Called(eventType) 211 } 212 213 // IncrementWebSocketBroadcastBufferSize provides a mock function with given fields: hub, amount 214 func (_m *MetricsInterface) IncrementWebSocketBroadcastBufferSize(hub string, amount float64) { 215 _m.Called(hub, amount) 216 } 217 218 // IncrementWebSocketBroadcastUsersRegistered provides a mock function with given fields: hub, amount 219 func (_m *MetricsInterface) IncrementWebSocketBroadcastUsersRegistered(hub string, amount float64) { 220 _m.Called(hub, amount) 221 } 222 223 // IncrementWebhookPost provides a mock function with given fields: 224 func (_m *MetricsInterface) IncrementWebhookPost() { 225 _m.Called() 226 } 227 228 // IncrementWebsocketEvent provides a mock function with given fields: eventType 229 func (_m *MetricsInterface) IncrementWebsocketEvent(eventType string) { 230 _m.Called(eventType) 231 } 232 233 // IncrementWebsocketReconnectEvent provides a mock function with given fields: eventType 234 func (_m *MetricsInterface) IncrementWebsocketReconnectEvent(eventType string) { 235 _m.Called(eventType) 236 } 237 238 // ObserveApiEndpointDuration provides a mock function with given fields: endpoint, method, statusCode, elapsed 239 func (_m *MetricsInterface) ObserveApiEndpointDuration(endpoint string, method string, statusCode string, elapsed float64) { 240 _m.Called(endpoint, method, statusCode, elapsed) 241 } 242 243 // ObserveClusterRequestDuration provides a mock function with given fields: elapsed 244 func (_m *MetricsInterface) ObserveClusterRequestDuration(elapsed float64) { 245 _m.Called(elapsed) 246 } 247 248 // ObserveEnabledUsers provides a mock function with given fields: users 249 func (_m *MetricsInterface) ObserveEnabledUsers(users int64) { 250 _m.Called(users) 251 } 252 253 // ObserveFilesSearchDuration provides a mock function with given fields: elapsed 254 func (_m *MetricsInterface) ObserveFilesSearchDuration(elapsed float64) { 255 _m.Called(elapsed) 256 } 257 258 // ObservePluginApiDuration provides a mock function with given fields: pluginID, apiName, success, elapsed 259 func (_m *MetricsInterface) ObservePluginApiDuration(pluginID string, apiName string, success bool, elapsed float64) { 260 _m.Called(pluginID, apiName, success, elapsed) 261 } 262 263 // ObservePluginHookDuration provides a mock function with given fields: pluginID, hookName, success, elapsed 264 func (_m *MetricsInterface) ObservePluginHookDuration(pluginID string, hookName string, success bool, elapsed float64) { 265 _m.Called(pluginID, hookName, success, elapsed) 266 } 267 268 // ObservePluginMultiHookDuration provides a mock function with given fields: elapsed 269 func (_m *MetricsInterface) ObservePluginMultiHookDuration(elapsed float64) { 270 _m.Called(elapsed) 271 } 272 273 // ObservePluginMultiHookIterationDuration provides a mock function with given fields: pluginID, elapsed 274 func (_m *MetricsInterface) ObservePluginMultiHookIterationDuration(pluginID string, elapsed float64) { 275 _m.Called(pluginID, elapsed) 276 } 277 278 // ObservePostsSearchDuration provides a mock function with given fields: elapsed 279 func (_m *MetricsInterface) ObservePostsSearchDuration(elapsed float64) { 280 _m.Called(elapsed) 281 } 282 283 // ObserveRemoteClusterClockSkew provides a mock function with given fields: remoteID, skew 284 func (_m *MetricsInterface) ObserveRemoteClusterClockSkew(remoteID string, skew float64) { 285 _m.Called(remoteID, skew) 286 } 287 288 // ObserveRemoteClusterPingDuration provides a mock function with given fields: remoteID, elapsed 289 func (_m *MetricsInterface) ObserveRemoteClusterPingDuration(remoteID string, elapsed float64) { 290 _m.Called(remoteID, elapsed) 291 } 292 293 // ObserveStoreMethodDuration provides a mock function with given fields: method, success, elapsed 294 func (_m *MetricsInterface) ObserveStoreMethodDuration(method string, success string, elapsed float64) { 295 _m.Called(method, success, elapsed) 296 } 297 298 // Register provides a mock function with given fields: 299 func (_m *MetricsInterface) Register() { 300 _m.Called() 301 } 302 303 // SetReplicaLagAbsolute provides a mock function with given fields: node, value 304 func (_m *MetricsInterface) SetReplicaLagAbsolute(node string, value float64) { 305 _m.Called(node, value) 306 } 307 308 // SetReplicaLagTime provides a mock function with given fields: node, value 309 func (_m *MetricsInterface) SetReplicaLagTime(node string, value float64) { 310 _m.Called(node, value) 311 }