From 8211bed6a08bb114471cc7daebed56305354c4c8 Mon Sep 17 00:00:00 2001 From: SuperQ Date: Sat, 22 Jan 2022 17:26:26 +0100 Subject: [PATCH] Fix up deprecated grpc.WithInsecure() Signed-off-by: SuperQ --- prober/grpc.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/prober/grpc.go b/prober/grpc.go index c528597..dc616ff 100644 --- a/prober/grpc.go +++ b/prober/grpc.go @@ -23,6 +23,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/credentials" + "google.golang.org/grpc/credentials/insecure" "google.golang.org/grpc/health/grpc_health_v1" "google.golang.org/grpc/peer" "google.golang.org/grpc/status" @@ -165,7 +166,7 @@ func ProbeGRPC(ctx context.Context, target string, module config.Module, registr target = targetHost + ":" + targetPort if !module.GRPC.TLS { level.Debug(logger).Log("msg", "Dialing GRPC without TLS") - opts = append(opts, grpc.WithInsecure()) + opts = append(opts, grpc.WithTransportCredentials(insecure.NewCredentials())) if len(targetPort) == 0 { target = targetHost + ":80" } -- 2.25.1