Initial commit

This commit is contained in:
JetSprow
2026-04-29 05:12:39 +10:00
commit 27dbca9cbf
379 changed files with 43486 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
package main
import (
"context"
"log"
"os"
"os/signal"
"runtime/debug"
"syscall"
"github.com/jboard/jboard-agent/internal/config"
"github.com/jboard/jboard-agent/internal/probe"
)
const version = "2.3.0"
func main() {
debug.SetGCPercent(50)
cfg := config.Load()
log.Printf("[agent] jboard-agent v%s starting in probe-only mode — server=%s", version, cfg.ServerURL)
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
go probe.LatencyLoop(ctx, cfg)
go probe.TraceLoop(ctx, cfg)
sigCh := make(chan os.Signal, 1)
signal.Notify(sigCh, syscall.SIGINT, syscall.SIGTERM)
<-sigCh
log.Println("[agent] shutting down...")
cancel()
}