Exporting Variables for Debug
The variables are * Total Channels * Total Subscribers * Total of unique Messages received by the system.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user