From 1e481627e3f83a06d1ebc3d45d8617d610217121 Mon Sep 17 00:00:00 2001 From: Ryan D McGuire Date: Tue, 25 Mar 2025 10:41:49 -0400 Subject: [PATCH] add grpc dial opts for grpc-gateway --- app.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app.go b/app.go index d09f8e4..02d790e 100644 --- a/app.go +++ b/app.go @@ -6,6 +6,8 @@ import ( "gitea.libretechconsulting.com/rmcguire/go-app/pkg/app" grpcopts "gitea.libretechconsulting.com/rmcguire/go-app/pkg/srv/grpc/opts" httpopts "gitea.libretechconsulting.com/rmcguire/go-app/pkg/srv/http/opts" + "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" weatherpb "gitea.libretechconsulting.com/rmcguire/ambient-local-exporter/api/v1alpha1/weather" "gitea.libretechconsulting.com/rmcguire/ambient-local-exporter/pkg/ambient" @@ -47,6 +49,9 @@ func prepareApp(ctx context.Context, aw *ambient.AmbientWeather) *app.App { // GRPC Service for retrieving weather GRPC: &grpcopts.AppGRPC{ + GRPCDialOpts: []grpc.DialOption{ + grpc.WithTransportCredentials(insecure.NewCredentials()), + }, Services: []*grpcopts.GRPCService{ { Name: "Weather Service",