feat:#36 added protobuf communication for modules

This commit is contained in:
Elmar Kresse
2024-06-17 00:59:33 +02:00
parent 8548a537ec
commit fad85f2884
18 changed files with 1286 additions and 59 deletions

View File

@@ -21,6 +21,7 @@ import (
"github.com/pocketbase/pocketbase/plugins/migratecmd"
_ "htwkalender/data-manager/migrations"
"htwkalender/data-manager/service"
"htwkalender/data-manager/service/grpc"
"log/slog"
"os"
"strings"
@@ -32,6 +33,9 @@ func main() {
// loosely check if it was executed using "go run"
isGoRun := strings.HasPrefix(os.Args[0], os.TempDir())
//start grpc server
go grpc.StartGRPCServer(app)
migratecmd.MustRegister(app, app.RootCmd, migratecmd.Config{
// enable auto creation of migration files when making collection changes in the Admin UI
// (the isGoRun check is to enable it only during development)
@@ -43,4 +47,5 @@ func main() {
if err := app.Start(); err != nil {
slog.Error("Failed to start app: ", "error", err)
}
}