15 Star 246 Fork 42

杰克/elk-blog

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
server.go 477 Bytes
一键复制 编辑 原始数据 按行查看 历史
jikeytang 提交于 2022-07-05 16:22 +08:00 . 调整pkg目录相关内容
package admin
import (
"gitee.com/jikey/elk-blog/pkg/response"
"gitee.com/jikey/elk-blog/pkg/utils"
"github.com/gin-gonic/gin"
"github.com/shirou/gopsutil/host"
"github.com/shirou/gopsutil/mem"
)
type Server struct {
Base
}
// List 列表
func (s *Server) List(c *gin.Context) {
data := make(map[string]interface{})
data["cpu"] = utils.GetCpuPercent()
data["mem"], _ = mem.VirtualMemory()
data["sys"], _ = host.Info()
response.HTML(c, "system/monitor", data)
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/jikey/elk-blog.git
git@gitee.com:jikey/elk-blog.git
jikey
elk-blog
elk-blog
d402f94cccdf

搜索帮助