27 lines
471 B
Go
27 lines
471 B
Go
package controller
|
|
|
|
import (
|
|
"github.com/gin-gonic/gin"
|
|
"hy2xs-admin/model/vo"
|
|
"hy2xs-admin/service"
|
|
)
|
|
|
|
func MonitorSystem(c *gin.Context) {
|
|
systemMonitorVo, err := service.MonitorSystem()
|
|
if err != nil {
|
|
vo.Fail(err.Error(), c)
|
|
return
|
|
}
|
|
vo.Success(systemMonitorVo, c)
|
|
}
|
|
|
|
func MonitorHysteria2(c *gin.Context) {
|
|
hysteria2MonitorVo, err := service.MonitorHysteria2()
|
|
if err != nil {
|
|
vo.Fail(err.Error(), c)
|
|
return
|
|
}
|
|
vo.Success(hysteria2MonitorVo, c)
|
|
}
|
|
|