refactor: update worker processes in EvoBGP to accept dependencies for shared store and job registry. Enhance scheduler, ingest, render, and deploy components to utilize a unified context and improve logging for drift detection. Update architecture documentation to reflect changes in process interactions and worker functionalities.
CI / changes (push) Successful in 5s
CI / go (push) Failing after 9s
CI / openapi (push) Has been skipped
CI / bird2 (push) Has been skipped

This commit is contained in:
Denozordec
2026-04-05 17:42:07 +07:00
parent 5d21f013cf
commit b7968db4e0
22 changed files with 936 additions and 77 deletions
+9 -5
View File
@@ -21,7 +21,7 @@ import (
"evobgp/internal/scheduler"
)
// microVPS entrypoint: one process — HTTP API (same as evobgp-api) plus in-process stubs for scheduler/ingest/render/deploy.
// microVPS entrypoint: one process — HTTP API plus in-process scheduler, ingest, render, deploy workers (shared store + job registry).
func main() {
cfg := config.Load()
opts := httpapi.Options{
@@ -42,10 +42,14 @@ func main() {
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)
defer stop()
go scheduler.Run(ctx)
go ingest.Run(ctx)
go render.Run(ctx)
go deploy.Run(ctx)
schedDeps := &scheduler.Deps{Store: srv.Store(), Jobs: srv.Jobs()}
ingestDeps := &ingest.Deps{Store: srv.Store()}
renderDeps := &render.Deps{Store: srv.Store()}
deployDeps := &deploy.Deps{Store: srv.Store()}
go scheduler.Run(ctx, schedDeps)
go ingest.Run(ctx, ingestDeps)
go render.Run(ctx, renderDeps)
go deploy.Run(ctx, deployDeps)
startBirdMetricsPoller()