+ statistics: store in separate file

+ GET /control/stats handler
This commit is contained in:
Simon Zolin
2019-08-22 16:34:58 +03:00
committed by Ildar Kamalov
parent 60eb55bdce
commit 4a58266ba3
11 changed files with 1075 additions and 12 deletions

View File

@@ -12,6 +12,7 @@ import (
"github.com/AdguardTeam/AdGuardHome/dhcpd"
"github.com/AdguardTeam/AdGuardHome/dnsfilter"
"github.com/AdguardTeam/AdGuardHome/dnsforward"
"github.com/AdguardTeam/AdGuardHome/stats"
"github.com/AdguardTeam/golibs/file"
"github.com/AdguardTeam/golibs/log"
yaml "gopkg.in/yaml.v2"
@@ -68,6 +69,7 @@ type configuration struct {
controlLock sync.Mutex
transport *http.Transport
client *http.Client
stats stats.Stats
// cached version.json to avoid hammering github.io for each page reload
versionCheckJSON []byte