5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-23 14:01:35 +00:00
matterbridge/vendor/github.com/mattermost/platform/einterfaces/metrics.go

51 lines
1.2 KiB
Go
Raw Normal View History

2017-08-16 21:37:37 +00:00
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
2017-01-16 22:59:50 +00:00
// See License.txt for license information.
package einterfaces
type MetricsInterface interface {
StartServer()
StopServer()
IncrementPostCreate()
2017-03-25 20:04:10 +00:00
IncrementWebhookPost()
2017-01-16 22:59:50 +00:00
IncrementPostSentEmail()
IncrementPostSentPush()
IncrementPostBroadcast()
IncrementPostFileAttachment(count int)
IncrementHttpRequest()
IncrementHttpError()
ObserveHttpRequestDuration(elapsed float64)
2017-03-25 20:04:10 +00:00
IncrementClusterRequest()
ObserveClusterRequestDuration(elapsed float64)
2017-01-16 22:59:50 +00:00
IncrementLogin()
IncrementLoginFail()
IncrementEtagHitCounter(route string)
IncrementEtagMissCounter(route string)
IncrementMemCacheHitCounter(cacheName string)
IncrementMemCacheMissCounter(cacheName string)
2017-03-25 20:04:10 +00:00
IncrementMemCacheMissCounterSession()
IncrementMemCacheHitCounterSession()
IncrementWebsocketEvent(eventType string)
2017-08-16 21:37:37 +00:00
IncrementWebSocketBroadcast(eventType string)
2017-01-16 22:59:50 +00:00
AddMemCacheHitCounter(cacheName string, amount float64)
AddMemCacheMissCounter(cacheName string, amount float64)
}
var theMetricsInterface MetricsInterface
func RegisterMetricsInterface(newInterface MetricsInterface) {
theMetricsInterface = newInterface
}
func GetMetricsInterface() MetricsInterface {
return theMetricsInterface
}