1
0
mirror of https://github.com/astaxie/beego.git synced 2025-06-17 17:00:40 +00:00

rename key world 'governor' to 'admin'

This commit is contained in:
Ming Deng
2020-12-13 19:09:58 +08:00
parent 728296a7ae
commit 198b9cce5f
12 changed files with 39 additions and 39 deletions

View File

@ -17,7 +17,7 @@ package adapter
import (
"time"
_ "github.com/astaxie/beego/core/governor"
_ "github.com/astaxie/beego/core/admin"
"github.com/astaxie/beego/server/web"
)

View File

@ -31,19 +31,19 @@
package toolbox
import (
"github.com/astaxie/beego/core/governor"
"github.com/astaxie/beego/core/admin"
)
// AdminCheckList holds health checker map
// Deprecated using governor.AdminCheckList
// Deprecated using admin.AdminCheckList
var AdminCheckList map[string]HealthChecker
// HealthChecker health checker interface
type HealthChecker governor.HealthChecker
type HealthChecker admin.HealthChecker
// AddHealthCheck add health checker with name string
func AddHealthCheck(name string, hc HealthChecker) {
governor.AddHealthCheck(name, hc)
admin.AddHealthCheck(name, hc)
AdminCheckList[name] = hc
}

View File

@ -19,7 +19,7 @@ import (
"os"
"time"
"github.com/astaxie/beego/core/governor"
"github.com/astaxie/beego/core/admin"
)
var startTime = time.Now()
@ -31,20 +31,20 @@ func init() {
// ProcessInput parse input command string
func ProcessInput(input string, w io.Writer) {
governor.ProcessInput(input, w)
admin.ProcessInput(input, w)
}
// MemProf record memory profile in pprof
func MemProf(w io.Writer) {
governor.MemProf(w)
admin.MemProf(w)
}
// GetCPUProfile start cpu profile monitor
func GetCPUProfile(w io.Writer) {
governor.GetCPUProfile(w)
admin.GetCPUProfile(w)
}
// PrintGCSummary print gc information to io.Writer
func PrintGCSummary(w io.Writer) {
governor.PrintGCSummary(w)
admin.PrintGCSummary(w)
}