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:
@ -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"
|
||||
)
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user