Skip to content

Commit

Permalink
grpcreplay: fix deprecated grpc-go functions (#52)
Browse files Browse the repository at this point in the history
Signed-off-by: Koichi Shiraishi <zchee.io@gmail.com>
  • Loading branch information
zchee committed Jul 29, 2024
1 parent ead83fb commit f70c552
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions grpcreplay/grpcreplay.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
pb "github.com/google/go-replayers/grpcreplay/proto/grpcreplay"
spb "google.golang.org/genproto/googleapis/rpc/status"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/encoding/prototext"
Expand Down Expand Up @@ -422,11 +423,11 @@ func (rep *Replayer) Connection() (*grpc.ClientConn, error) {
panic(err) // we should never get an error because we just connect and stop
}
}()
conn, err := grpc.Dial(l.Addr().String(),
append([]grpc.DialOption{grpc.WithInsecure()},
grpc.WithBlock(),
conn, err := grpc.NewClient(l.Addr().String(),
append([]grpc.DialOption{grpc.WithTransportCredentials(insecure.NewCredentials())},
grpc.WithUnaryInterceptor(rep.interceptUnary),
grpc.WithStreamInterceptor(rep.interceptStream))...)
grpc.WithStreamInterceptor(rep.interceptStream))...,
)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit f70c552

Please sign in to comment.