Merged in feature/doctextstructure (pull request #56)

DocTextRunner Structure

* firstround

* shorttests
This commit is contained in:
Michael McGuinness
2025-02-07 14:15:06 +00:00
parent 90353d8161
commit 24a038ec3d
41 changed files with 929 additions and 55 deletions
+46
View File
@@ -0,0 +1,46 @@
package main
import (
"context"
"log/slog"
"os"
doctextrunner "queryorchestration/api/docTextRunner"
"queryorchestration/internal/document"
documenttext "queryorchestration/internal/document/text"
"queryorchestration/internal/server/runner"
"queryorchestration/internal/serviceconfig/objectstore"
"queryorchestration/internal/serviceconfig/queue/querysync"
_ "github.com/lib/pq"
)
type DocTextConfig struct {
runner.BaseConfig
objectstore.ObjectStoreConfig
querysync.QuerySyncConfig
}
func main() {
ctx := context.Background()
cfg := &DocTextConfig{}
cfg.ControllerFunc = func() runner.Controller {
doc := document.New(cfg)
text := documenttext.New(cfg, &documenttext.Services{
Document: doc,
})
return doctextrunner.New(cfg.GetValidator(), &doctextrunner.Services{
Text: text,
})
}
server, err := runner.New(ctx, cfg)
if err != nil {
slog.Error(err.Error())
os.Exit(1)
}
server.Listen(ctx)
}