Streamd v0.2.0: rename, modules panel, stable/beta channels
All checks were successful
release / build-and-upload (push) Successful in 7m5s

- Rename product/host binary to streamd (drm compat copy still shipped)
- Go module path streamd; STREAMD_* env aliases; agent UA streamd-agent
- Panel Modules store + agent pull sync (modstore / modsync)
- Rolling stable + beta download tags; README/docs channel curl blocks
- Release notes in docs/releases/v0.2.0.md attached by Forgejo Actions
This commit is contained in:
404errordeveloper 2026-10-10 15:58:26 +02:00
parent 066e018749
commit da8e1123ec
140 changed files with 2949 additions and 851 deletions

View file

@ -12,14 +12,15 @@ import (
"syscall"
"text/tabwriter"
"drmdecryption/apps/agent/internal/client"
"drmdecryption/apps/agent/internal/config"
"drmdecryption/apps/agent/internal/device"
"drmdecryption/apps/agent/internal/modsync"
"drmdecryption/apps/agent/internal/poller"
"drmdecryption/apps/agent/internal/queue"
"drmdecryption/apps/agent/internal/worker"
"drmdecryption/apps/agent/internal/wsclient"
"streamd/apps/agent/internal/client"
"streamd/apps/agent/internal/config"
"streamd/apps/agent/internal/device"
"streamd/apps/agent/internal/modsync"
"streamd/apps/agent/internal/poller"
"streamd/apps/agent/internal/queue"
"streamd/apps/agent/internal/worker"
"streamd/apps/agent/internal/wsclient"
"streamd/modhost"
)
// Run dispatches an agent subcommand. args[0] is the subcommand name.
@ -137,15 +138,25 @@ func runCmd(sub string, args []string) {
}
go p.Loop(stop)
// Prefer the panel-synced modules cache for capture jobs.
if cfg.ModulesDir != "" {
if err := modhost.SetModulesDir(cfg.ModulesDir); err != nil {
log.Fatalf("modules dir: %v", err)
}
log.Printf("modules dir %s", cfg.ModulesDir)
}
var ms *modsync.Syncer
if cfg.SyncModules {
ms := &modsync.Syncer{
ms = &modsync.Syncer{
API: api,
ModulesDir: cfg.ModulesDir,
Interval: cfg.ModulesSyncInterval(),
Prune: cfg.ModulesPrune,
Log: log.Default(),
}
go ms.Loop(stop)
log.Printf("modules sync enabled interval=%s", cfg.ModulesSyncInterval())
log.Printf("modules pull sync enabled interval=%s dir=%s", cfg.ModulesSyncInterval(), cfg.ModulesDir)
}
ws := wsclient.New(cfg.StreamdURL, cfg.Token, cfg.AgentID, log.Default())
@ -171,6 +182,16 @@ func runCmd(sub string, args []string) {
}
}()
}
ws.OnModulesChanged = func(name, reason string) {
if ms == nil {
return
}
go func() {
if err := ms.Once(); err != nil {
log.Printf("modules sync after change to %s: %v", name, err)
}
}()
}
go ws.Loop()
for i := 0; i < cfg.Workers; i++ {