Exporting Variables for Debug

The variables are

* Total Channels
* Total Subscribers
* Total of unique Messages received by the system.
This commit is contained in:
claudemiro
2015-01-12 22:41:42 -03:00
parent 71d5099ac3
commit cadc72d482
4 changed files with 37 additions and 7 deletions
+5
View File
@@ -5,6 +5,7 @@
package main
import (
_ "expvar"
"net/http"
"os"
@@ -17,6 +18,10 @@ import (
func NewRouter() *mux.Router {
router := mux.NewRouter().StrictSlash(true)
if Conf.Expvar {
router.Handle("/debug/vars", http.DefaultServeMux)
}
for _, route := range routes {
var handler http.Handler