27117900eb
Complete architecture rewrite following go2rtc patterns: - pkg/ for pure logic (camdb, tester, probe, generate) - internal/ for application glue with Init() modules - Single HTTP server on :4567 with all endpoints - zerolog with password masking and memory ring buffer - Environment-based config only (no YAML files) API endpoints: /api/search, /api/streams, /api/test, /api/probe, /api/generate, /api/health, /api/log Dependencies: go2rtc v1.9.14, go-sqlite3, miekg/dns, zerolog
35 lines
615 B
Go
35 lines
615 B
Go
package main
|
|
|
|
import (
|
|
"github.com/eduard256/strix/internal/api"
|
|
"github.com/eduard256/strix/internal/app"
|
|
"github.com/eduard256/strix/internal/generate"
|
|
"github.com/eduard256/strix/internal/probe"
|
|
"github.com/eduard256/strix/internal/search"
|
|
"github.com/eduard256/strix/internal/test"
|
|
)
|
|
|
|
func main() {
|
|
app.Version = "2.0.0"
|
|
|
|
type module struct {
|
|
name string
|
|
init func()
|
|
}
|
|
|
|
modules := []module{
|
|
{"", app.Init},
|
|
{"api", api.Init},
|
|
{"search", search.Init},
|
|
{"test", test.Init},
|
|
{"probe", probe.Init},
|
|
{"generate", generate.Init},
|
|
}
|
|
|
|
for _, m := range modules {
|
|
m.init()
|
|
}
|
|
|
|
select {}
|
|
}
|