Skip to content

Commit

Permalink
grpc reflect client depreceted
Browse files Browse the repository at this point in the history
grpc reflect client depreceted
  • Loading branch information
oke11o committed Oct 18, 2023
1 parent f42a5ca commit 0422ddd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions components/guns/grpc/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
"google.golang.org/grpc/codes"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/metadata"
reflectpb "google.golang.org/grpc/reflection/grpc_reflection_v1alpha"
"google.golang.org/grpc/status"
)

Expand Down Expand Up @@ -86,7 +85,7 @@ func (g *Gun) WarmUp(opts *warmup.Options) (interface{}, error) {

meta := make(metadata.MD)
refCtx := metadata.NewOutgoingContext(context.Background(), meta)
refClient := grpcreflect.NewClient(refCtx, reflectpb.NewServerReflectionClient(conn))
refClient := grpcreflect.NewClientAuto(refCtx, conn)
listServices, err := refClient.ListServices()
if err != nil {
g.GunDeps.Log.Error("failed to get services list", zap.Error(err))
Expand Down

0 comments on commit 0422ddd

Please sign in to comment.