chore: add some annotations (#1544)
ref: #1075 because I am not a native English, maybe have a bit problem.
This commit is contained in:
@ -13,16 +13,19 @@ func main() {
|
||||
StartGin()
|
||||
}
|
||||
|
||||
// ConfigRuntime sets the number of operating system threads.
|
||||
func ConfigRuntime() {
|
||||
nuCPU := runtime.NumCPU()
|
||||
runtime.GOMAXPROCS(nuCPU)
|
||||
fmt.Printf("Running with %d CPUs\n", nuCPU)
|
||||
}
|
||||
|
||||
// StartWrokers start starsWorker by goroutine.
|
||||
func StartWorkers() {
|
||||
go statsWorker()
|
||||
}
|
||||
|
||||
// StartGin starts gin web server with setting router.
|
||||
func StartGin() {
|
||||
gin.SetMode(gin.ReleaseMode)
|
||||
|
||||
|
@ -50,6 +50,7 @@ func connectedUsers() uint64 {
|
||||
return uint64(connected)
|
||||
}
|
||||
|
||||
// Stats returns savedStats data.
|
||||
func Stats() map[string]uint64 {
|
||||
mutexStats.RLock()
|
||||
defer mutexStats.RUnlock()
|
||||
|
Reference in New Issue
Block a user