Files
query-orchestration/cmd/storeEventRunner/main.go
T
Michael McGuinness fee71e7740 Merged in feature/postprocessing (pull request #114)
Feature/postprocessing

* tests

* passtest

* fixshorttests

* mosttests

* improvingbasedockerfile

* testspeeds

* testing

* host

* canparallel

* clean

* passfullsuite

* singlepagemax

* test

* findfeatures

* findstables

* tbls

* tablestoo

* tablestoo

* lateraltests

* tableloc

* cleanup

* inlinetable

* childids

* cleanup

* tests
2025-04-22 14:40:16 +00:00

49 lines
1.1 KiB
Go

// **Listens For**: S3 Event
//
// **Action**.
//
// It will identify the type of event and the location of said event, and forward the task accordingly.
//
// It supports the document initialisation and document text processing stages. Events may be pushed to the DOCINIT queue.
package main
import (
"context"
"log/slog"
"os"
storeeventrunner "queryorchestration/api/storeEventRunner"
documentstore "queryorchestration/internal/document/store"
"queryorchestration/internal/server/runner"
"queryorchestration/internal/serviceconfig/queue/documentinit"
_ "github.com/lib/pq"
)
type StoreEventConfig struct {
runner.BaseConfig[storeeventrunner.S3EventNotification]
documentinit.DocInitConfig
}
func main() {
ctx := context.Background()
cfg := &StoreEventConfig{}
cfg.ControllerFunc = func() runner.Controller[storeeventrunner.S3EventNotification] {
store := documentstore.New(cfg)
return storeeventrunner.New(&storeeventrunner.Services{
Store: store,
})
}
server, err := runner.New(ctx, cfg)
if err != nil {
slog.Error(err.Error())
os.Exit(1)
}
server.Listen(ctx)
}