临时提交

This commit is contained in:
GoEdgeLab
2020-07-21 11:18:47 +08:00
commit cb5d9feb7a
32 changed files with 729 additions and 0 deletions

26
internal/nodes/node.go Normal file
View File

@@ -0,0 +1,26 @@
package nodes
import (
"github.com/TeaOSLab/EdgeNode/internal/configs"
"github.com/iwind/TeaGo/logs"
)
var sharedNodeConfig *configs.NodeConfig = nil
type Node struct {
}
func NewNode() *Node {
return &Node{}
}
func (this *Node) Start() {
nodeConfig, err := configs.SharedNodeConfig()
if err != nil {
logs.Println("[NODE]start failed: read node config failed: " + err.Error())
return
}
sharedNodeConfig = nodeConfig
logs.PrintAsJSON(nodeConfig)
}