add grpc dial opts for grpc-gateway
This commit is contained in:
parent
9077ae354a
commit
1e481627e3
5
app.go
5
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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user