feat: enhance evobgp with new command-line tools for bundle management, including pull, verify, and apply functionalities. Update go.mod to include necessary dependencies and complete todos in architecture plan for improved observability and deployment practices.
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
// Package scheduler drives module/CDN refresh intervals and enqueues work (broker or job_audit).
|
||||
// This process entrypoint is a stub until PostgreSQL and NATS/Redis are wired.
|
||||
package scheduler
|
||||
|
||||
import (
|
||||
"context"
|
||||
"log"
|
||||
"time"
|
||||
)
|
||||
|
||||
// Run blocks until ctx is cancelled. In production it connects to DB + broker and schedules refresh events.
|
||||
func Run(ctx context.Context) {
|
||||
t := time.NewTicker(60 * time.Second)
|
||||
defer t.Stop()
|
||||
log.Printf("evobgp-scheduler: started (stub; connect EVOBGP_DATABASE_URL / EVOBGP_BROKER_URL for full stack)")
|
||||
for {
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
log.Printf("evobgp-scheduler: stopped")
|
||||
return
|
||||
case <-t.C:
|
||||
// Placeholder: evaluate module cron / refresh_interval and publish jobs.
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user