// **Listens For**: Body Containing Client ID // // **Action**. // // Adds an event for each document into the DOCSYNC queue for the given Client. package main import ( "context" "log/slog" "os" clientsyncrunner "queryorchestration/api/clientSyncRunner" clientsync "queryorchestration/internal/client/sync" "queryorchestration/internal/server/runner" "queryorchestration/internal/serviceconfig/queue/documentsync" _ "github.com/lib/pq" ) type ClientSyncConfig struct { runner.BaseConfig[clientsyncrunner.Body] documentsync.DocSyncConfig } func main() { ctx := context.Background() cfg := &ClientSyncConfig{} cfg.ControllerFunc = func() runner.Controller[clientsyncrunner.Body] { svc := clientsync.New(cfg) c := clientsyncrunner.New(cfg.GetValidator(), &clientsyncrunner.Services{ ClientSync: svc, }) return &c } server, err := runner.New(ctx, cfg) if err != nil { slog.Error(err.Error()) os.Exit(1) } server.Listen(ctx) }