|
@@ -8,11 +8,13 @@ import (
|
|
|
"github.com/manucorporat/stats"
|
|
"github.com/manucorporat/stats"
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
-var ips = stats.New()
|
|
|
|
|
-var messages = stats.New()
|
|
|
|
|
-var users = stats.New()
|
|
|
|
|
-var mutexStats sync.RWMutex
|
|
|
|
|
-var savedStats map[string]uint64
|
|
|
|
|
|
|
+var (
|
|
|
|
|
+ ips = stats.New()
|
|
|
|
|
+ messages = stats.New()
|
|
|
|
|
+ users = stats.New()
|
|
|
|
|
+ mutexStats sync.RWMutex
|
|
|
|
|
+ savedStats map[string]uint64
|
|
|
|
|
+)
|
|
|
|
|
|
|
|
func statsWorker() {
|
|
func statsWorker() {
|
|
|
c := time.Tick(1 * time.Second)
|
|
c := time.Tick(1 * time.Second)
|