diff --git a/transport/grpc/client.go b/transport/grpc/client.go index a1424d209..da6ceb028 100644 --- a/transport/grpc/client.go +++ b/transport/grpc/client.go @@ -10,7 +10,7 @@ import ( "github.com/go-kratos/kratos/v2/middleware" "github.com/go-kratos/kratos/v2/registry" "github.com/go-kratos/kratos/v2/selector" - "github.com/go-kratos/kratos/v2/selector/p2c" + "github.com/go-kratos/kratos/v2/selector/wrr" "github.com/go-kratos/kratos/v2/transport" "github.com/go-kratos/kratos/v2/transport/grpc/resolver/discovery" @@ -25,7 +25,7 @@ import ( func init() { if selector.GlobalSelector() == nil { - selector.SetGlobalSelector(p2c.NewBuilder()) + selector.SetGlobalSelector(wrr.NewBuilder()) } } diff --git a/transport/http/client.go b/transport/http/client.go index 79ac4f911..c0ad5ee38 100644 --- a/transport/http/client.go +++ b/transport/http/client.go @@ -16,13 +16,13 @@ import ( "github.com/go-kratos/kratos/v2/middleware" "github.com/go-kratos/kratos/v2/registry" "github.com/go-kratos/kratos/v2/selector" - "github.com/go-kratos/kratos/v2/selector/p2c" + "github.com/go-kratos/kratos/v2/selector/wrr" "github.com/go-kratos/kratos/v2/transport" ) func init() { if selector.GlobalSelector() == nil { - selector.SetGlobalSelector(p2c.NewBuilder()) + selector.SetGlobalSelector(wrr.NewBuilder()) } }