Skip to content

Commit

Permalink
chore: Fix lint errors due to gRPC deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
aholstenson committed Jun 28, 2024
1 parent 290e6e7 commit 2459f0c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cmd/test/events/consume/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func main() {
processingTimeout := flag.Int("processing-timeout", 30000, "Processing timeout in milliseconds")
flag.Parse()

conn, err := grpc.Dial("localhost:8080", grpc.WithTransportCredentials(insecure.NewCredentials()))
conn, err := grpc.NewClient("localhost:8080", grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
log.Fatal(err)
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/test/events/publish/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func main() {
parallelism := flag.Int("parallelism", 1, "Number of parallel publishers")
flag.Parse()

conn, err := grpc.Dial("localhost:8080", grpc.WithTransportCredentials(insecure.NewCredentials()))
conn, err := grpc.NewClient("localhost:8080", grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
log.Fatal(err)
}
Expand Down
5 changes: 2 additions & 3 deletions internal/api/events/v1alpha1/module_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,8 @@ func newClient(
logger *zap.Logger,
listener *bufconn.Listener,
) (*grpc.ClientConn, error) {
conn, err := grpc.DialContext(
context.Background(),
"",
conn, err := grpc.NewClient(
"passthrough://bufnet",
grpc.WithContextDialer(func(context.Context, string) (net.Conn, error) {
return listener.Dial()
}),
Expand Down
5 changes: 2 additions & 3 deletions internal/api/state/v1alpha1/module_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,8 @@ func newClient(
logger *zap.Logger,
listener *bufconn.Listener,
) (*grpc.ClientConn, error) {
conn, err := grpc.DialContext(
context.Background(),
"",
conn, err := grpc.NewClient(
"passthrough://bufnet",
grpc.WithContextDialer(func(context.Context, string) (net.Conn, error) {
return listener.Dial()
}),
Expand Down

0 comments on commit 2459f0c

Please sign in to comment.