174644b63c
add openapi infra * add openapi infra Includes generated stubs and all deps * generatetolocation * basesetupoffunctionsandclient * round1controllertests * passintegrationtests * cleanupfromfullsuite * storedjson * fixjsonyaml * fixtests Approved-by: Michael McGuinness
28 lines
536 B
Go
28 lines
536 B
Go
package main
|
|
|
|
import (
|
|
"context"
|
|
controllers "queryorchestration/api/queryRunner"
|
|
"queryorchestration/internal/document"
|
|
"queryorchestration/internal/queue"
|
|
"queryorchestration/internal/server"
|
|
|
|
_ "github.com/lib/pq"
|
|
)
|
|
|
|
func main() {
|
|
ctx := context.Background()
|
|
|
|
queryrunner := func(cfg *server.Config) queue.Controller {
|
|
svc := document.New(cfg.Database)
|
|
|
|
return controllers.NewQueryRunner(svc, cfg.Validator)
|
|
}
|
|
|
|
server := queue.NewServer(ctx, &queue.ListenerConfig{
|
|
Controller: queryrunner,
|
|
})
|
|
|
|
server.Listen(ctx)
|
|
}
|