* stats: use uint32 or uint64 integer values, not int

This commit is contained in:
Simon Zolin
2019-09-10 17:59:10 +03:00
parent 8a2aa57e24
commit 04e2566e9e
7 changed files with 97 additions and 96 deletions

View File

@@ -9,7 +9,7 @@ import (
)
type statsConfig struct {
Interval uint `json:"interval"`
Interval uint32 `json:"interval"`
}
// Get stats configuration
@@ -89,6 +89,6 @@ func RegisterStatsHandlers() {
httpRegister(http.MethodGet, "/control/stats_info", handleStatsInfo)
}
func checkStatsInterval(i uint) bool {
func checkStatsInterval(i uint32) bool {
return i == 1 || i == 7 || i == 30 || i == 90
}