增加节点停止、启动、安装测试等功能

This commit is contained in:
GoEdgeLab
2020-10-27 12:33:34 +08:00
parent f22c228a69
commit 5b0ed31f2d
5 changed files with 113 additions and 4 deletions

View File

@@ -6,14 +6,21 @@ import (
teaconst "github.com/TeaOSLab/EdgeNode/internal/const"
"github.com/TeaOSLab/EdgeNode/internal/nodes"
_ "github.com/iwind/TeaGo/bootstrap"
"os"
)
func main() {
app := apps.NewAppCmd().
Version(teaconst.Version).
Product(teaconst.ProductName).
Usage(teaconst.ProcessName + " [-v|start|stop|restart|sync|update]")
Usage(teaconst.ProcessName + " [-v|start|stop|restart|sync|update|test]")
app.On("test", func() {
err := nodes.NewNode().Test()
if err != nil {
_, _ = os.Stderr.WriteString(err.Error())
}
})
app.On("sync", func() {
// TODO
fmt.Println("not implemented yet")