Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2017-05-11 17:51:46 +0300
committerJacob Vosmaer <jacob@gitlab.com>2017-05-11 17:51:46 +0300
commitce8e19ad2f63c31f2991e0b0904d79c23c52390e (patch)
tree896c8d61d58f52247cd7c89ef8bfe4e43091061f /internal/connectioncounter
parentd6429ef9edd0165a4d338c5dbcf73a4fa0cc473a (diff)
Doc comment
Diffstat (limited to 'internal/connectioncounter')
-rw-r--r--internal/connectioncounter/connectioncounter.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/connectioncounter/connectioncounter.go b/internal/connectioncounter/connectioncounter.go
index 21e28cf1b..0fbf3210b 100644
--- a/internal/connectioncounter/connectioncounter.go
+++ b/internal/connectioncounter/connectioncounter.go
@@ -20,6 +20,9 @@ func init() {
prometheus.MustRegister(connTotal)
}
+// New returns a listener which increments a prometheus counter on each
+// accepted connection. Use cType to specify the connection type, this is
+// a prometheus label.
func New(cType string, l net.Listener) net.Listener {
return &countingListener{
cType: cType,