Files
query-orchestration/cmd/queryRunner/main.go
T
Michael McGuinness 4ccb980593 Merged in feature/jobcollector (pull request #30)
Initial Job Collector (changes pending)

* movearroundtocleancollector

* internalgetfunctions

* completecollectorquery

* simplify

* fixtests

* addvendor

* noplaceholder
2025-01-21 12:28:46 +00:00

33 lines
678 B
Go

package main
import (
"context"
controllers "queryorchestration/api/queryRunner"
"queryorchestration/internal/job/collector"
"queryorchestration/internal/query/document"
"queryorchestration/internal/server"
"queryorchestration/internal/server/queue"
_ "github.com/lib/pq"
)
func main() {
ctx := context.Background()
queryrunner := func(cfg *server.Config) queue.Controller {
coll := collector.New(cfg.Database)
svc := document.New(cfg.Database, &document.Services{
Collector: coll,
})
return controllers.NewQueryRunner(svc, cfg.Validator)
}
server := queue.NewServer(ctx, &queue.ListenerConfig{
Controller: queryrunner,
})
server.Listen(ctx)
}