File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,11 +25,12 @@ import (
2525 event "skywalking.apache.org/repo/goapi/collect/event/v3"
2626
2727 "google.golang.org/grpc"
28+ "google.golang.org/grpc/credentials/insecure"
2829)
2930
3031// ReportEvent creates a grpc client and reports an event to OAP.
3132func ReportEvent (addr string , e * event.Event ) (* common.Commands , error ) {
32- conn , err := grpc .Dial (addr , grpc .WithInsecure ( ))
33+ conn , err := grpc .Dial (addr , grpc .WithTransportCredentials ( insecure . NewCredentials () ))
3334 if err != nil {
3435 return nil , err
3536 }
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ import (
2727 "google.golang.org/grpc"
2828 "google.golang.org/grpc/codes"
2929 "google.golang.org/grpc/credentials"
30+ "google.golang.org/grpc/credentials/insecure"
3031 healthpb "google.golang.org/grpc/health/grpc_health_v1"
3132 "google.golang.org/grpc/status"
3233)
@@ -52,7 +53,7 @@ func HealthCheck(addr string, enableTLS bool) int {
5253 })
5354 opts = append (opts , grpc .WithTransportCredentials (creds ))
5455 } else {
55- opts = append (opts , grpc .WithInsecure ( ))
56+ opts = append (opts , grpc .WithTransportCredentials ( insecure . NewCredentials () ))
5657 }
5758 dialCtx , cancel := context .WithTimeout (ctx , time .Second )
5859 defer cancel ()
You can’t perform that action at this time.
0 commit comments