mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-02 22:10:25 +08:00
增加节点停止、启动、安装测试等功能
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user