Go边缘代理: 单文件可执行+嵌入式MediaMTX+监控+注册
- edge-agent/: Go项目, 支持Windows托盘/Linux无头两种模式 - 使用go:embed将MediaMTX二进制嵌入单一可执行文件 - 首次运行自动释放MediaMTX并生成边缘节点配置 - 自动注册到origin (POST /api/nodes/register) - 10秒心跳上报CPU/RAM/带宽/连接数 (gopsutil采集) - Windows: getlantern/systray托盘菜单(状态/CPU/MEM/带宽/退出) - Linux: headless模式,适合systemd守护 - build.sh/build.ps1: 交叉编译脚本(Linux/Windows) - 更新start.sh/品牌名StreamCore
This commit is contained in:
1 parent
980b91f41f
commit
409e5d314e
14 files changed
+800
-11
No files matched your search
@@ -0,0 +1,16 @@
|
||||
//go:build !windows
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"streamcore-edge/agent"
|
||||
)
|
||||
|
||||
func runTray(ag *agent.Agent) {
|
||||
log.Println("Running in headless mode (Linux server)")
|
||||
log.Printf("Node ID: %s", ag.NodeID())
|
||||
log.Printf("HLS port: %d", ag.Config().HlsPort)
|
||||
log.Printf("API port: %d", ag.Config().ApiPort)
|
||||
log.Println("Press Ctrl+C to stop")
|
||||
}
|
||||
Reference in new issue
Block a user