diff --git a/README.md b/README.md index 3e5ead6..e23f83e 100644 --- a/README.md +++ b/README.md @@ -120,7 +120,7 @@ func main() { httpAddr := "" grpcAddr := "" defaultHttpClient := &fasthttp.Client{} - defaultGRPCClient, grpcErr := grpc.Dial(grpcAddr, grpc.WithTransportCredentials(insecure.NewCredentials())) + defaultGRPCClient, grpcErr := grpc.NewClient(grpcAddr, grpc.WithTransportCredentials(insecure.NewCredentials())) if grpcErr != nil { panic(grpcErr) } diff --git a/go.mod b/go.mod index 59cd257..933fbd4 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.21 require ( github.com/valyala/fasthttp v1.53.0 golang.org/x/text v0.15.0 - google.golang.org/grpc v1.63.2 + google.golang.org/grpc v1.64.0 google.golang.org/protobuf v1.34.1 ) @@ -15,5 +15,5 @@ require ( github.com/valyala/bytebufferpool v1.0.0 // indirect golang.org/x/net v0.23.0 // indirect golang.org/x/sys v0.18.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 // indirect ) diff --git a/go.sum b/go.sum index b6a2b78..f841605 100644 --- a/go.sum +++ b/go.sum @@ -16,7 +16,11 @@ golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de h1:cZGRis4/ot9uVm639a+rHCUaG0JJHEsdyzSQTMX+suY= google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:H4O17MA/PE9BsGx3w+a+W2VOLLD1Qf7oJneAoU6WktY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237 h1:NnYq6UN9ReLM9/Y01KWNOWyI5xQ9kbIms5GGJVwS/Yc= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= +google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg= google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= diff --git a/test/bert_test.go b/test/bert_test.go index 08140e1..6b08730 100644 --- a/test/bert_test.go +++ b/test/bert_test.go @@ -76,7 +76,7 @@ func TestBertServiceForBertChinese(t *testing.T) { httpAddr := "127.0.0.1:9001" grpcAddr := "127.0.0.1:9000" defaultHTTPClient := &fasthttp.Client{} - defaultGRPCClient, grpcErr := grpc.Dial(grpcAddr, grpc.WithTransportCredentials(insecure.NewCredentials())) + defaultGRPCClient, grpcErr := grpc.NewClient(grpcAddr, grpc.WithTransportCredentials(insecure.NewCredentials())) if grpcErr != nil { panic(grpcErr) } @@ -102,7 +102,7 @@ func TestBertServiceForBertMultilingual(t *testing.T) { httpAddr := "127.0.0.1:9001" grpcAddr := "127.0.0.1:9000" defaultHTTPClient := &fasthttp.Client{} - defaultGRPCClient, grpcErr := grpc.Dial(grpcAddr, grpc.WithTransportCredentials(insecure.NewCredentials())) + defaultGRPCClient, grpcErr := grpc.NewClient(grpcAddr, grpc.WithTransportCredentials(insecure.NewCredentials())) if grpcErr != nil { panic(grpcErr) } diff --git a/test/bert_w2ner_test.go b/test/bert_w2ner_test.go index d548b7c..9038eab 100644 --- a/test/bert_w2ner_test.go +++ b/test/bert_w2ner_test.go @@ -67,7 +67,7 @@ func TestW2NERService(t *testing.T) { grpcAddr := "127.0.0.1:9000" defaultHTTPClient := &fasthttp.Client{} - defaultGRPCClient, grpcErr := grpc.Dial(grpcAddr, grpc.WithTransportCredentials(insecure.NewCredentials())) + defaultGRPCClient, grpcErr := grpc.NewClient(grpcAddr, grpc.WithTransportCredentials(insecure.NewCredentials())) if grpcErr != nil { panic(grpcErr) } diff --git a/test/triton_test.go b/test/triton_test.go index b71ef8d..23bacbb 100644 --- a/test/triton_test.go +++ b/test/triton_test.go @@ -19,7 +19,7 @@ func TestTritonHTTPClientInit(_ *testing.T) { } func TestTritonGRPCClientInit(_ *testing.T) { - _, err := grpc.Dial("127.0.0.1:9000", grpc.WithTransportCredentials(insecure.NewCredentials())) + _, err := grpc.NewClient("127.0.0.1:9000", grpc.WithTransportCredentials(insecure.NewCredentials())) if err != nil { panic(err) }