package main import ( "context" "log/slog" "os" jobsyncrunner "queryorchestration/api/jobSyncRunner" jobsync "queryorchestration/internal/job/sync" "queryorchestration/internal/server/runner" "queryorchestration/internal/serviceconfig/queue/documentsync" _ "github.com/lib/pq" ) type JobSyncConfig struct { runner.BaseConfig documentsync.DocSyncConfig } func main() { ctx := context.Background() cfg := &JobSyncConfig{} cfg.ControllerFunc = func() runner.Controller { svc := jobsync.New(cfg) c := jobsyncrunner.New(cfg.GetValidator(), &jobsyncrunner.Services{ JobSync: svc, }) return &c } server, err := runner.New(ctx, cfg) if err != nil { slog.Error(err.Error()) os.Exit(1) } server.Listen(ctx) }