feat: enable gRPC reflection for service registration
This commit is contained in:
parent
abb6774b77
commit
a03d707904
@ -13,6 +13,7 @@ import (
|
||||
"go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/peer"
|
||||
"google.golang.org/grpc/reflection"
|
||||
|
||||
hav1 "gitea.nik4nao.com/nik/home-services/gen/ha/v1"
|
||||
grpcadapter "gitea.nik4nao.com/nik/home-services/ha-gateway/internal/adapters/primary/grpc"
|
||||
@ -84,6 +85,7 @@ func main() {
|
||||
hav1.RegisterLightServiceServer(srv, grpcadapter.NewLightGRPC(lightApp))
|
||||
hav1.RegisterSwitchServiceServer(srv, grpcadapter.NewSwitchGRPC(switchApp))
|
||||
hav1.RegisterEventServiceServer(srv, &grpcadapter.EventGRPC{})
|
||||
reflection.Register(srv)
|
||||
|
||||
// 8. Start listener.
|
||||
lis, err := net.Listen("tcp", ":"+cfg.GRPCPort)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user