diff options
Diffstat (limited to 'einterfaces/metrics.go')
-rw-r--r-- | einterfaces/metrics.go | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/einterfaces/metrics.go b/einterfaces/metrics.go new file mode 100644 index 000000000..192639e02 --- /dev/null +++ b/einterfaces/metrics.go @@ -0,0 +1,32 @@ +// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. +// See License.txt for license information. + +package einterfaces + +type MetricsInterface interface { + StartServer() + StopServer() + + IncrementPostCreate() + IncrementPostSentEmail() + IncrementPostSentPush() + IncrementPostBroadcast() + IncrementPostFileAttachment(count int) + + IncrementHttpRequest() + IncrementHttpError() + ObserveHttpRequestDuration(elapsed float64) + + IncrementLogin() + IncrementLoginFail() +} + +var theMetricsInterface MetricsInterface + +func RegisterMetricsInterface(newInterface MetricsInterface) { + theMetricsInterface = newInterface +} + +func GetMetricsInterface() MetricsInterface { + return theMetricsInterface +} |