implement grpc gateway and addl handler support

This commit is contained in:
2025-03-24 16:39:11 -04:00
parent 262f6a4232
commit 7f60a59d42
7 changed files with 15 additions and 12 deletions

View File

@ -9,9 +9,6 @@ import (
"gitea.libretechconsulting.com/rmcguire/go-app/pkg/config"
)
// TODO: Make Configurable
const GRPC_GW_API_PATH = "/api"
func (a *App) Done() <-chan any {
return a.appDone
}

View File

@ -25,7 +25,7 @@ func (a *App) runGRPC(ctx context.Context) {
}
a.HTTP.Handlers = append(a.HTTP.Handlers, opts.HTTPHandler{
Prefix: GRPC_GW_API_PATH,
Prefix: a.cfg.GRPC.GRPCGatewayPath,
StripPrefix: true,
Handler: a.GRPC.GetGatewayMux(),
})