- 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
17 lines
344 B
Go
17 lines
344 B
Go
//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")
|
|
}
|