Skip to content

Commit

Permalink
update to register the service
Browse files Browse the repository at this point in the history
  • Loading branch information
e-n-0 committed Dec 12, 2024
1 parent fbfcda1 commit f2cbd41
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"os"
"strconv"

"gopkg.in/DataDog/dd-trace-go.v1/contrib/envoyproxy/go-control-plane"
gocontrolplane "gopkg.in/DataDog/dd-trace-go.v1/contrib/envoyproxy/go-control-plane"
"gopkg.in/DataDog/dd-trace-go.v1/internal/log"
"gopkg.in/DataDog/dd-trace-go.v1/internal/version"

Expand Down Expand Up @@ -140,11 +140,12 @@ func StartGPRCSsl(service extproc.ExternalProcessorServer, config serviceExtensi
return
}

si := go_control_plane.StreamServerInterceptor()
grpcCredentials := credentials.NewServerTLSFromCert(&cert)
grpcServer := grpc.NewServer(grpc.StreamInterceptor(si), grpc.Creds(grpcCredentials))
grpcServer := grpc.NewServer(grpc.Creds(grpcCredentials))

extproc.RegisterExternalProcessorServer(grpcServer, service)
appsecEnvoyExternalProcessorServer := gocontrolplane.AppsecEnvoyExternalProcessorServer(service)

extproc.RegisterExternalProcessorServer(grpcServer, appsecEnvoyExternalProcessorServer)
reflection.Register(grpcServer)
if err := grpcServer.Serve(lis); err != nil {
log.Error("service_extension: error starting gRPC server: %v\n", err)
Expand Down

0 comments on commit f2cbd41

Please sign in to comment.