Restore debug handler

This commit is contained in:
2014-09-24 14:13:08 +04:00
parent 2a6f063ab0
commit 8365c05961
4 changed files with 41 additions and 32 deletions
+5 -1
View File
@@ -62,7 +62,7 @@ func (h *Hub) Sub(s *Subscription) {
func (h *Hub) Info() map[string]map[string]uint {
info := make(map[string]map[string]uint)
for queue, size := range h.storage.Info() {
for queue, size := range h.storage.QueueSizes() {
info[queue] = map[string]uint{
"messages": size,
"subscriptions": 0,
@@ -83,6 +83,10 @@ func (h *Hub) Info() map[string]map[string]uint {
return info
}
func (h *Hub) StorageInfo() map[string]interface{} {
return h.storage.Info()
}
func (h *Hub) cleanupEverySecond() {
t := time.NewTicker(1 * time.Second)