V2.7 增加agent执行器

This commit is contained in:
georgehao
2019-07-03 22:31:27 +08:00
parent c3a89e9243
commit 37fb659c4e
48 changed files with 2832 additions and 513 deletions

28
agent/test/conf/conf.go Normal file
View File

@@ -0,0 +1,28 @@
/************************************************************
** @Description: conf
** @Author: george hao
** @Date: 2019-06-27 09:49
** @Last Modified by: george hao
** @Last Modified time: 2019-06-27 09:49
*************************************************************/
package main
import (
"github.com/astaxie/beego/logs"
"github.com/george518/PPGo_Job/agent/server"
)
func main() {
//获取配置,修改配置
loadconfig()
}
func loadconfig() {
path := "/Users/haodaquan/golang/src/github.com/george518/PPGo_Job/actuator/config/conf.ini"
server.InitConfig(path)
logs.Info(server.C.TcpIp, server.ConfPath)
server.SaveConfig("TcpIp", "10.32.33.22")
logs.Info(server.C.TcpIp, server.ConfPath)
}

18
agent/test/ip/ip.go Normal file
View File

@@ -0,0 +1,18 @@
/************************************************************
** @Description: ip
** @Author: george hao
** @Date: 2019-06-27 09:22
** @Last Modified by: george hao
** @Last Modified time: 2019-06-27 09:22
*************************************************************/
package main
import (
"github.com/astaxie/beego/logs"
"github.com/george518/PPGo_Job/libs"
)
func main() {
logs.Info(libs.PublicIp())
}