فهرست منبع

rename rpcx to zrpc

kevin 4 سال پیش
والد
کامیت
0b1ee79d3a
100فایلهای تغییر یافته به همراه144 افزوده شده و 144 حذف شده
  1. 5 5
      doc/bookstore-en.md
  2. 5 5
      doc/bookstore.md
  3. 3 3
      doc/goctl-rpc.md
  4. 3 3
      doc/shorturl-en.md
  5. 3 3
      doc/shorturl.md
  6. 4 4
      example/bookstore/api/internal/config/config.go
  7. 4 4
      example/bookstore/api/internal/svc/servicecontext.go
  8. 2 2
      example/bookstore/rpc/add/add.go
  9. 3 3
      example/bookstore/rpc/add/adder/adder.go
  10. 3 3
      example/bookstore/rpc/add/internal/config/config.go
  11. 2 2
      example/bookstore/rpc/check/check.go
  12. 3 3
      example/bookstore/rpc/check/checker/checker.go
  13. 3 3
      example/bookstore/rpc/check/internal/config/config.go
  14. 2 2
      example/graceful/dns/api/config/config.go
  15. 2 2
      example/graceful/dns/api/graceful.go
  16. 2 2
      example/graceful/dns/api/svc/servicecontext.go
  17. 3 3
      example/graceful/dns/rpc/gracefulrpc.go
  18. 2 2
      example/graceful/etcd/api/config/config.go
  19. 2 2
      example/graceful/etcd/api/etc/graceful-api.json
  20. 2 2
      example/graceful/etcd/api/graceful.go
  21. 2 2
      example/graceful/etcd/api/svc/servicecontext.go
  22. 1 1
      example/graceful/etcd/rpc/etc/graceful-rpc.json
  23. 3 3
      example/graceful/etcd/rpc/gracefulrpc.go
  24. 3 3
      example/rpc/client/direct/client.go
  25. 5 5
      example/rpc/client/lb/main.go
  26. 3 3
      example/rpc/client/stream/client.go
  27. 3 3
      example/rpc/client/unary/client.go
  28. 4 4
      example/rpc/proxy/proxy.go
  29. 1 1
      example/rpc/server/stream/etc/config.json
  30. 3 3
      example/rpc/server/stream/server.go
  31. 1 1
      example/rpc/server/unary/etc/config.json
  32. 1 1
      example/rpc/server/unary/etc/config1.json
  33. 1 1
      example/rpc/server/unary/etc/k8s.json
  34. 3 3
      example/rpc/server/unary/server.go
  35. 2 2
      example/shorturl/api/internal/config/config.go
  36. 2 2
      example/shorturl/api/internal/svc/servicecontext.go
  37. 2 2
      example/shorturl/rpc/transform/internal/config/config.go
  38. 2 2
      example/shorturl/rpc/transform/transform.go
  39. 3 3
      example/shorturl/rpc/transform/transformer/transformer.go
  40. 4 4
      example/tracing/edge/main.go
  41. 7 7
      example/tracing/portal/server.go
  42. 3 3
      example/tracing/user/server.go
  43. 1 1
      rest/config.go
  44. 3 3
      tools/goctl/rpc/README.md
  45. 3 3
      tools/goctl/rpc/gen/gencall.go
  46. 2 2
      tools/goctl/rpc/gen/genconfig.go
  47. 2 2
      tools/goctl/rpc/gen/genmain.go
  48. 3 3
      zrpc/client.go
  49. 2 2
      zrpc/client_test.go
  50. 1 1
      zrpc/config.go
  51. 1 1
      zrpc/config_test.go
  52. 0 0
      zrpc/internal/auth/auth.go
  53. 0 0
      zrpc/internal/auth/credential.go
  54. 0 0
      zrpc/internal/auth/credential_test.go
  55. 0 0
      zrpc/internal/auth/vars.go
  56. 1 1
      zrpc/internal/balancer/p2c/p2c.go
  57. 0 0
      zrpc/internal/balancer/p2c/p2c_test.go
  58. 0 0
      zrpc/internal/chainclientinterceptors.go
  59. 0 0
      zrpc/internal/chainclientinterceptors_test.go
  60. 0 0
      zrpc/internal/chainserverinterceptors.go
  61. 0 0
      zrpc/internal/chainserverinterceptors_test.go
  62. 3 3
      zrpc/internal/client.go
  63. 0 0
      zrpc/internal/client_test.go
  64. 1 1
      zrpc/internal/clientinterceptors/breakerinterceptor.go
  65. 1 1
      zrpc/internal/clientinterceptors/breakerinterceptor_test.go
  66. 0 0
      zrpc/internal/clientinterceptors/durationinterceptor.go
  67. 0 0
      zrpc/internal/clientinterceptors/durationinterceptor_test.go
  68. 0 0
      zrpc/internal/clientinterceptors/prommetricinterceptor.go
  69. 0 0
      zrpc/internal/clientinterceptors/prommetricinterceptor_test.go
  70. 0 0
      zrpc/internal/clientinterceptors/timeoutinterceptor.go
  71. 0 0
      zrpc/internal/clientinterceptors/timeoutinterceptor_test.go
  72. 0 0
      zrpc/internal/clientinterceptors/tracinginterceptor.go
  73. 0 0
      zrpc/internal/clientinterceptors/tracinginterceptor_test.go
  74. 0 0
      zrpc/internal/codes/accept.go
  75. 0 0
      zrpc/internal/codes/accept_test.go
  76. 0 0
      zrpc/internal/mock/deposit.pb.go
  77. 0 0
      zrpc/internal/mock/deposit.proto
  78. 0 0
      zrpc/internal/mock/depositserver.go
  79. 0 0
      zrpc/internal/resolver/directbuilder.go
  80. 0 0
      zrpc/internal/resolver/directbuilder_test.go
  81. 0 0
      zrpc/internal/resolver/discovbuilder.go
  82. 0 0
      zrpc/internal/resolver/resolver.go
  83. 0 0
      zrpc/internal/resolver/resolver_test.go
  84. 0 0
      zrpc/internal/resolver/subset.go
  85. 0 0
      zrpc/internal/resolver/subset_test.go
  86. 0 0
      zrpc/internal/rpclogger.go
  87. 0 0
      zrpc/internal/rpcpubserver.go
  88. 1 1
      zrpc/internal/rpcserver.go
  89. 0 0
      zrpc/internal/rpcserver_test.go
  90. 0 0
      zrpc/internal/server.go
  91. 0 0
      zrpc/internal/server_test.go
  92. 1 1
      zrpc/internal/serverinterceptors/authinterceptor.go
  93. 1 1
      zrpc/internal/serverinterceptors/authinterceptor_test.go
  94. 0 0
      zrpc/internal/serverinterceptors/crashinterceptor.go
  95. 0 0
      zrpc/internal/serverinterceptors/crashinterceptor_test.go
  96. 0 0
      zrpc/internal/serverinterceptors/prommetricinterceptor.go
  97. 0 0
      zrpc/internal/serverinterceptors/prommetricinterceptor_test.go
  98. 0 0
      zrpc/internal/serverinterceptors/sheddinginterceptor.go
  99. 0 0
      zrpc/internal/serverinterceptors/sheddinginterceptor_test.go
  100. 0 0
      zrpc/internal/serverinterceptors/statinterceptor.go

+ 5 - 5
doc/bookstore-en.md

@@ -347,8 +347,8 @@ you can change the listening port in file `etc/add.yaml`.
   ```go
   type Config struct {
       rest.RestConf
-      Add   rpcx.RpcClientConf     // manual code
-      Check rpcx.RpcClientConf     // manual code
+      Add   zrpc.RpcClientConf     // manual code
+      Check zrpc.RpcClientConf     // manual code
   }
   ```
 
@@ -364,8 +364,8 @@ you can change the listening port in file `etc/add.yaml`.
   func NewServiceContext(c config.Config) *ServiceContext {
       return &ServiceContext{
           Config:  c,
-          Adder:   adder.NewAdder(rpcx.MustNewClient(c.Add)),         // manual code
-          Checker: checker.NewChecker(rpcx.MustNewClient(c.Check)),   // manual code
+          Adder:   adder.NewAdder(zrpc.MustNewClient(c.Add)),         // manual code
+          Checker: checker.NewChecker(zrpc.MustNewClient(c.Check)),   // manual code
       }
   }
   ```
@@ -477,7 +477,7 @@ Till now, we’ve done the modification of API Gateway. All the manually added c
 
   ```go
   type Config struct {
-      rpcx.RpcServerConf
+      zrpc.RpcServerConf
       DataSource string             // manual code
       Table      string             // manual code
       Cache      cache.CacheConf    // manual code

+ 5 - 5
doc/bookstore.md

@@ -349,8 +349,8 @@
   ```go
   type Config struct {
       rest.RestConf
-      Add   rpcx.RpcClientConf     // 手动代码
-      Check rpcx.RpcClientConf     // 手动代码
+      Add   zrpc.RpcClientConf     // 手动代码
+      Check zrpc.RpcClientConf     // 手动代码
   }
   ```
 
@@ -366,8 +366,8 @@
   func NewServiceContext(c config.Config) *ServiceContext {
       return &ServiceContext{
           Config:  c,
-          Adder:   adder.NewAdder(rpcx.MustNewClient(c.Add)),         // 手动代码
-          Checker: checker.NewChecker(rpcx.MustNewClient(c.Check)),   // 手动代码
+          Adder:   adder.NewAdder(zrpc.MustNewClient(c.Add)),         // 手动代码
+          Checker: checker.NewChecker(zrpc.MustNewClient(c.Check)),   // 手动代码
       }
   }
   ```
@@ -477,7 +477,7 @@
 
   ```go
   type Config struct {
-      rpcx.RpcServerConf
+      zrpc.RpcServerConf
       DataSource string             // 手动代码
       Table      string             // 手动代码
       Cache      cache.CacheConf    // 手动代码

+ 3 - 3
doc/goctl-rpc.md

@@ -221,11 +221,11 @@ OPTIONS:
     *rrBalanced does not implement Picker (wrong type for Pick method)
 		have Pick(context.Context, balancer.PickInfo) (balancer.SubConn, func(balancer.DoneInfo), error)
     want Pick(balancer.PickInfo) (balancer.PickResult, error)
-    #github.com/tal-tech/go-zero/rpcx/internal/balancer/p2c
-    ../../../go/pkg/mod/github.com/tal-tech/go-zero@v1.0.12/rpcx/internal/balancer/p2c/p2c.go:41:32: not enough arguments in call to base.NewBalancerBuilder
+    #github.com/tal-tech/go-zero/zrpc/internal/balancer/p2c
+    ../../../go/pkg/mod/github.com/tal-tech/go-zero@v1.0.12/zrpc/internal/balancer/p2c/p2c.go:41:32: not enough arguments in call to base.NewBalancerBuilder
 	have (string, *p2cPickerBuilder)
   want (string, base.PickerBuilder, base.Config)
-  ../../../go/pkg/mod/github.com/tal-tech/go-zero@v1.0.12/rpcx/internal/balancer/p2c/p2c.go:58:9: cannot use &p2cPicker literal (type *p2cPicker) as type balancer.Picker in return argument:
+  ../../../go/pkg/mod/github.com/tal-tech/go-zero@v1.0.12/zrpc/internal/balancer/p2c/p2c.go:58:9: cannot use &p2cPicker literal (type *p2cPicker) as type balancer.Picker in return argument:
 	*p2cPicker does not implement balancer.Picker (wrong type for Pick method)
 		have Pick(context.Context, balancer.PickInfo) (balancer.SubConn, func(balancer.DoneInfo), error)
 		want Pick(balancer.PickInfo) (balancer.PickResult, error)

+ 3 - 3
doc/shorturl-en.md

@@ -284,7 +284,7 @@ And now, let’s walk through the complete flow of quickly create a microservice
   ```go
   type Config struct {
   	rest.RestConf
-  	Transform rpcx.RpcClientConf     // manual code
+  	Transform zrpc.RpcClientConf     // manual code
   }
   ```
 
@@ -299,7 +299,7 @@ And now, let’s walk through the complete flow of quickly create a microservice
   func NewServiceContext(c config.Config) *ServiceContext {
   	return &ServiceContext{
   		Config:    c,
-      Transformer: transformer.NewTransformer(rpcx.MustNewClient(c.Transform)), // manual code
+      Transformer: transformer.NewTransformer(zrpc.MustNewClient(c.Transform)), // manual code
   	}
   }
   ```
@@ -409,7 +409,7 @@ Till now, we’ve done the modification of API Gateway. All the manually added c
 
   ```go
   type Config struct {
-  	rpcx.RpcServerConf
+  	zrpc.RpcServerConf
   	DataSource string             // manual code
   	Table      string             // manual code
   	Cache      cache.CacheConf    // manual code

+ 3 - 3
doc/shorturl.md

@@ -280,7 +280,7 @@
   ```go
   type Config struct {
   	rest.RestConf
-  	Transform rpcx.RpcClientConf     // 手动代码
+  	Transform zrpc.RpcClientConf     // 手动代码
   }
   ```
 
@@ -295,7 +295,7 @@
   func NewServiceContext(c config.Config) *ServiceContext {
   	return &ServiceContext{
   		Config:    c,
-      Transformer: transformer.NewTransformer(rpcx.MustNewClient(c.Transform)),  // 手动代码
+      Transformer: transformer.NewTransformer(zrpc.MustNewClient(c.Transform)),  // 手动代码
   	}
   }
   ```
@@ -405,7 +405,7 @@
 
   ```go
   type Config struct {
-  	rpcx.RpcServerConf
+  	zrpc.RpcServerConf
   	DataSource string             // 手动代码
   	Table      string             // 手动代码
   	Cache      cache.CacheConf    // 手动代码

+ 4 - 4
example/bookstore/api/internal/config/config.go

@@ -2,11 +2,11 @@ package config
 
 import (
 	"github.com/tal-tech/go-zero/rest"
-	"github.com/tal-tech/go-zero/rpcx"
+	"github.com/tal-tech/go-zero/zrpc"
 )
 
 type Config struct {
 	rest.RestConf
-	Add   rpcx.RpcClientConf
-	Check rpcx.RpcClientConf
-}
+	Add   zrpc.RpcClientConf
+	Check zrpc.RpcClientConf
+}

+ 4 - 4
example/bookstore/api/internal/svc/servicecontext.go

@@ -5,7 +5,7 @@ import (
 	"bookstore/rpc/add/adder"
 	"bookstore/rpc/check/checker"
 
-	"github.com/tal-tech/go-zero/rpcx"
+	"github.com/tal-tech/go-zero/zrpc"
 )
 
 type ServiceContext struct {
@@ -17,7 +17,7 @@ type ServiceContext struct {
 func NewServiceContext(c config.Config) *ServiceContext {
 	return &ServiceContext{
 		Config:  c,
-		Adder:   adder.NewAdder(rpcx.MustNewClient(c.Add)),
-		Checker: checker.NewChecker(rpcx.MustNewClient(c.Check)),
+		Adder:   adder.NewAdder(zrpc.MustNewClient(c.Add)),
+		Checker: checker.NewChecker(zrpc.MustNewClient(c.Check)),
 	}
-}
+}

+ 2 - 2
example/bookstore/rpc/add/add.go

@@ -14,7 +14,7 @@ import (
 
 	"github.com/tal-tech/go-zero/core/conf"
 	"github.com/tal-tech/go-zero/core/logx"
-	"github.com/tal-tech/go-zero/rpcx"
+	"github.com/tal-tech/go-zero/zrpc"
 	"google.golang.org/grpc"
 )
 
@@ -28,7 +28,7 @@ func main() {
 	ctx := svc.NewServiceContext(c)
 	adderSrv := server.NewAdderServer(ctx)
 
-	s, err := rpcx.NewServer(c.RpcServerConf, func(grpcServer *grpc.Server) {
+	s, err := zrpc.NewServer(c.RpcServerConf, func(grpcServer *grpc.Server) {
 		add.RegisterAdderServer(grpcServer, adderSrv)
 	})
 	logx.Must(err)

+ 3 - 3
example/bookstore/rpc/add/adder/adder.go

@@ -10,7 +10,7 @@ import (
 	"context"
 
 	"github.com/tal-tech/go-zero/core/jsonx"
-	"github.com/tal-tech/go-zero/rpcx"
+	"github.com/tal-tech/go-zero/zrpc"
 )
 
 type (
@@ -19,11 +19,11 @@ type (
 	}
 
 	defaultAdder struct {
-		cli rpcx.Client
+		cli zrpc.Client
 	}
 )
 
-func NewAdder(cli rpcx.Client) Adder {
+func NewAdder(cli zrpc.Client) Adder {
 	return &defaultAdder{
 		cli: cli,
 	}

+ 3 - 3
example/bookstore/rpc/add/internal/config/config.go

@@ -2,12 +2,12 @@ package config
 
 import (
 	"github.com/tal-tech/go-zero/core/stores/cache"
-	"github.com/tal-tech/go-zero/rpcx"
+	"github.com/tal-tech/go-zero/zrpc"
 )
 
 type Config struct {
-	rpcx.RpcServerConf
+	zrpc.RpcServerConf
 	DataSource string
 	Table      string
 	Cache      cache.CacheConf
-}
+}

+ 2 - 2
example/bookstore/rpc/check/check.go

@@ -14,7 +14,7 @@ import (
 
 	"github.com/tal-tech/go-zero/core/conf"
 	"github.com/tal-tech/go-zero/core/logx"
-	"github.com/tal-tech/go-zero/rpcx"
+	"github.com/tal-tech/go-zero/zrpc"
 	"google.golang.org/grpc"
 )
 
@@ -28,7 +28,7 @@ func main() {
 	ctx := svc.NewServiceContext(c)
 	checkerSrv := server.NewCheckerServer(ctx)
 
-	s, err := rpcx.NewServer(c.RpcServerConf, func(grpcServer *grpc.Server) {
+	s, err := zrpc.NewServer(c.RpcServerConf, func(grpcServer *grpc.Server) {
 		check.RegisterCheckerServer(grpcServer, checkerSrv)
 	})
 	logx.Must(err)

+ 3 - 3
example/bookstore/rpc/check/checker/checker.go

@@ -10,7 +10,7 @@ import (
 	"context"
 
 	"github.com/tal-tech/go-zero/core/jsonx"
-	"github.com/tal-tech/go-zero/rpcx"
+	"github.com/tal-tech/go-zero/zrpc"
 )
 
 type (
@@ -19,11 +19,11 @@ type (
 	}
 
 	defaultChecker struct {
-		cli rpcx.Client
+		cli zrpc.Client
 	}
 )
 
-func NewChecker(cli rpcx.Client) Checker {
+func NewChecker(cli zrpc.Client) Checker {
 	return &defaultChecker{
 		cli: cli,
 	}

+ 3 - 3
example/bookstore/rpc/check/internal/config/config.go

@@ -2,12 +2,12 @@ package config
 
 import (
 	"github.com/tal-tech/go-zero/core/stores/cache"
-	"github.com/tal-tech/go-zero/rpcx"
+	"github.com/tal-tech/go-zero/zrpc"
 )
 
 type Config struct {
-	rpcx.RpcServerConf
+	zrpc.RpcServerConf
 	DataSource string
 	Table      string
 	Cache      cache.CacheConf
-}
+}

+ 2 - 2
example/graceful/dns/api/config/config.go

@@ -2,10 +2,10 @@ package config
 
 import (
 	"github.com/tal-tech/go-zero/rest"
-	"github.com/tal-tech/go-zero/rpcx"
+	"github.com/tal-tech/go-zero/zrpc"
 )
 
 type Config struct {
 	rest.RestConf
-	Rpc rpcx.RpcClientConf
+	Rpc zrpc.RpcClientConf
 }

+ 2 - 2
example/graceful/dns/api/graceful.go

@@ -8,7 +8,7 @@ import (
 	"github.com/tal-tech/go-zero/example/graceful/dns/api/handler"
 	"github.com/tal-tech/go-zero/example/graceful/dns/api/svc"
 	"github.com/tal-tech/go-zero/rest"
-	"github.com/tal-tech/go-zero/rpcx"
+	"github.com/tal-tech/go-zero/zrpc"
 )
 
 var configFile = flag.String("f", "etc/graceful-api.json", "the config file")
@@ -19,7 +19,7 @@ func main() {
 	var c config.Config
 	conf.MustLoad(*configFile, &c)
 
-	client := rpcx.MustNewClient(c.Rpc)
+	client := zrpc.MustNewClient(c.Rpc)
 	ctx := &svc.ServiceContext{
 		Client: client,
 	}

+ 2 - 2
example/graceful/dns/api/svc/servicecontext.go

@@ -1,7 +1,7 @@
 package svc
 
-import "github.com/tal-tech/go-zero/rpcx"
+import "github.com/tal-tech/go-zero/zrpc"
 
 type ServiceContext struct {
-	Client rpcx.Client
+	Client zrpc.Client
 }

+ 3 - 3
example/graceful/dns/rpc/gracefulrpc.go

@@ -9,7 +9,7 @@ import (
 
 	"github.com/tal-tech/go-zero/core/conf"
 	"github.com/tal-tech/go-zero/example/graceful/dns/rpc/graceful"
-	"github.com/tal-tech/go-zero/rpcx"
+	"github.com/tal-tech/go-zero/zrpc"
 	"google.golang.org/grpc"
 )
 
@@ -39,10 +39,10 @@ func (gs *GracefulServer) Grace(ctx context.Context, req *graceful.Request) (*gr
 func main() {
 	flag.Parse()
 
-	var c rpcx.RpcServerConf
+	var c zrpc.RpcServerConf
 	conf.MustLoad(*configFile, &c)
 
-	server := rpcx.MustNewServer(c, func(grpcServer *grpc.Server) {
+	server := zrpc.MustNewServer(c, func(grpcServer *grpc.Server) {
 		graceful.RegisterGraceServiceServer(grpcServer, NewGracefulServer())
 	})
 	defer server.Stop()

+ 2 - 2
example/graceful/etcd/api/config/config.go

@@ -2,10 +2,10 @@ package config
 
 import (
 	"github.com/tal-tech/go-zero/rest"
-	"github.com/tal-tech/go-zero/rpcx"
+	"github.com/tal-tech/go-zero/zrpc"
 )
 
 type Config struct {
 	rest.RestConf
-	Rpc rpcx.RpcClientConf
+	Rpc zrpc.RpcClientConf
 }

+ 2 - 2
example/graceful/etcd/api/etc/graceful-api.json

@@ -6,7 +6,7 @@
     "Rpc": {
         "Etcd": {
             "Hosts": ["etcd.discov:2379"],
-            "Key": "rpcx"
+            "Key": "zrpc"
         }
     }
-}
+}

+ 2 - 2
example/graceful/etcd/api/graceful.go

@@ -8,7 +8,7 @@ import (
 	"github.com/tal-tech/go-zero/example/graceful/etcd/api/handler"
 	"github.com/tal-tech/go-zero/example/graceful/etcd/api/svc"
 	"github.com/tal-tech/go-zero/rest"
-	"github.com/tal-tech/go-zero/rpcx"
+	"github.com/tal-tech/go-zero/zrpc"
 )
 
 var configFile = flag.String("f", "etc/graceful-api.json", "the config file")
@@ -19,7 +19,7 @@ func main() {
 	var c config.Config
 	conf.MustLoad(*configFile, &c)
 
-	client := rpcx.MustNewClient(c.Rpc)
+	client := zrpc.MustNewClient(c.Rpc)
 	ctx := &svc.ServiceContext{
 		Client: client,
 	}

+ 2 - 2
example/graceful/etcd/api/svc/servicecontext.go

@@ -1,7 +1,7 @@
 package svc
 
-import "github.com/tal-tech/go-zero/rpcx"
+import "github.com/tal-tech/go-zero/zrpc"
 
 type ServiceContext struct {
-	Client rpcx.Client
+	Client zrpc.Client
 }

+ 1 - 1
example/graceful/etcd/rpc/etc/graceful-rpc.json

@@ -3,6 +3,6 @@
     "ListenOn": "0.0.0.0:3456",
     "Etcd": {
         "Hosts": ["etcd.discov:2379"],
-        "Key": "rpcx"
+        "Key": "zrpc"
     }
 }

+ 3 - 3
example/graceful/etcd/rpc/gracefulrpc.go

@@ -9,7 +9,7 @@ import (
 
 	"github.com/tal-tech/go-zero/core/conf"
 	"github.com/tal-tech/go-zero/example/graceful/etcd/rpc/graceful"
-	"github.com/tal-tech/go-zero/rpcx"
+	"github.com/tal-tech/go-zero/zrpc"
 	"google.golang.org/grpc"
 )
 
@@ -39,10 +39,10 @@ func (gs *GracefulServer) Grace(ctx context.Context, req *graceful.Request) (*gr
 func main() {
 	flag.Parse()
 
-	var c rpcx.RpcServerConf
+	var c zrpc.RpcServerConf
 	conf.MustLoad(*configFile, &c)
 
-	server := rpcx.MustNewServer(c, func(grpcServer *grpc.Server) {
+	server := zrpc.MustNewServer(c, func(grpcServer *grpc.Server) {
 		graceful.RegisterGraceServiceServer(grpcServer, NewGracefulServer())
 	})
 	defer server.Stop()

+ 3 - 3
example/rpc/client/direct/client.go

@@ -8,7 +8,7 @@ import (
 
 	"github.com/tal-tech/go-zero/core/discov"
 	"github.com/tal-tech/go-zero/example/rpc/remote/unary"
-	"github.com/tal-tech/go-zero/rpcx"
+	"github.com/tal-tech/go-zero/zrpc"
 )
 
 const timeFormat = "15:04:05"
@@ -16,10 +16,10 @@ const timeFormat = "15:04:05"
 func main() {
 	flag.Parse()
 
-	client := rpcx.MustNewClient(rpcx.RpcClientConf{
+	client := zrpc.MustNewClient(zrpc.RpcClientConf{
 		Etcd: discov.EtcdConf{
 			Hosts: []string{"localhost:2379"},
-			Key:   "rpcx",
+			Key:   "zrpc",
 		},
 	})
 

+ 5 - 5
example/rpc/client/lb/main.go

@@ -9,7 +9,7 @@ import (
 
 	"github.com/tal-tech/go-zero/core/discov"
 	"github.com/tal-tech/go-zero/example/rpc/remote/unary"
-	"github.com/tal-tech/go-zero/rpcx"
+	"github.com/tal-tech/go-zero/zrpc"
 )
 
 var lb = flag.String("t", "direct", "the load balancer type")
@@ -17,20 +17,20 @@ var lb = flag.String("t", "direct", "the load balancer type")
 func main() {
 	flag.Parse()
 
-	var cli rpcx.Client
+	var cli zrpc.Client
 	switch *lb {
 	case "direct":
-		cli = rpcx.MustNewClient(rpcx.RpcClientConf{
+		cli = zrpc.MustNewClient(zrpc.RpcClientConf{
 			Endpoints: []string{
 				"localhost:3456",
 				"localhost:3457",
 			},
 		})
 	case "discov":
-		cli = rpcx.MustNewClient(rpcx.RpcClientConf{
+		cli = zrpc.MustNewClient(zrpc.RpcClientConf{
 			Etcd: discov.EtcdConf{
 				Hosts: []string{"localhost:2379"},
-				Key:   "rpcx",
+				Key:   "zrpc",
 			},
 		})
 	default:

+ 3 - 3
example/rpc/client/stream/client.go

@@ -8,17 +8,17 @@ import (
 
 	"github.com/tal-tech/go-zero/core/discov"
 	"github.com/tal-tech/go-zero/example/rpc/remote/stream"
-	"github.com/tal-tech/go-zero/rpcx"
+	"github.com/tal-tech/go-zero/zrpc"
 )
 
 const name = "kevin"
 
-var key = flag.String("key", "rpcx", "the key on etcd")
+var key = flag.String("key", "zrpc", "the key on etcd")
 
 func main() {
 	flag.Parse()
 
-	client, err := rpcx.NewClientNoAuth(discov.EtcdConf{
+	client, err := zrpc.NewClientNoAuth(discov.EtcdConf{
 		Hosts: []string{"localhost:2379"},
 		Key:   *key,
 	})

+ 3 - 3
example/rpc/client/unary/client.go

@@ -8,7 +8,7 @@ import (
 
 	"github.com/tal-tech/go-zero/core/conf"
 	"github.com/tal-tech/go-zero/example/rpc/remote/unary"
-	"github.com/tal-tech/go-zero/rpcx"
+	"github.com/tal-tech/go-zero/zrpc"
 )
 
 var configFile = flag.String("f", "config.json", "the config file")
@@ -16,9 +16,9 @@ var configFile = flag.String("f", "config.json", "the config file")
 func main() {
 	flag.Parse()
 
-	var c rpcx.RpcClientConf
+	var c zrpc.RpcClientConf
 	conf.MustLoad(*configFile, &c)
-	client := rpcx.MustNewClient(c)
+	client := zrpc.MustNewClient(c)
 	ticker := time.NewTicker(time.Millisecond * 500)
 	defer ticker.Stop()
 	for {

+ 4 - 4
example/rpc/proxy/proxy.go

@@ -7,7 +7,7 @@ import (
 	"github.com/tal-tech/go-zero/core/logx"
 	"github.com/tal-tech/go-zero/core/service"
 	"github.com/tal-tech/go-zero/example/rpc/remote/unary"
-	"github.com/tal-tech/go-zero/rpcx"
+	"github.com/tal-tech/go-zero/zrpc"
 	"google.golang.org/grpc"
 )
 
@@ -17,7 +17,7 @@ var (
 )
 
 type GreetServer struct {
-	*rpcx.RpcProxy
+	*zrpc.RpcProxy
 }
 
 func (s *GreetServer) Greet(ctx context.Context, req *unary.Request) (*unary.Response, error) {
@@ -33,7 +33,7 @@ func (s *GreetServer) Greet(ctx context.Context, req *unary.Request) (*unary.Res
 func main() {
 	flag.Parse()
 
-	proxy := rpcx.MustNewServer(rpcx.RpcServerConf{
+	proxy := zrpc.MustNewServer(zrpc.RpcServerConf{
 		ServiceConf: service.ServiceConf{
 			Log: logx.LogConf{
 				Mode: "console",
@@ -42,7 +42,7 @@ func main() {
 		ListenOn: *listen,
 	}, func(grpcServer *grpc.Server) {
 		unary.RegisterGreeterServer(grpcServer, &GreetServer{
-			RpcProxy: rpcx.NewProxy(*server),
+			RpcProxy: zrpc.NewProxy(*server),
 		})
 	})
 	proxy.Start()

+ 1 - 1
example/rpc/server/stream/etc/config.json

@@ -6,7 +6,7 @@
         "Hosts": [
             "localhost:2379"
         ],
-        "Key": "rpcx"
+        "Key": "zrpc"
     },
     "Redis": {
         "Host": "localhost:6379",

+ 3 - 3
example/rpc/server/stream/server.go

@@ -6,7 +6,7 @@ import (
 
 	"github.com/tal-tech/go-zero/core/conf"
 	"github.com/tal-tech/go-zero/example/rpc/remote/stream"
-	"github.com/tal-tech/go-zero/rpcx"
+	"github.com/tal-tech/go-zero/zrpc"
 	"google.golang.org/grpc"
 )
 
@@ -39,10 +39,10 @@ func (gs StreamGreetServer) Greet(s stream.StreamGreeter_GreetServer) error {
 }
 
 func main() {
-	var c rpcx.RpcServerConf
+	var c zrpc.RpcServerConf
 	conf.MustLoad("etc/config.json", &c)
 
-	server := rpcx.MustNewServer(c, func(grpcServer *grpc.Server) {
+	server := zrpc.MustNewServer(c, func(grpcServer *grpc.Server) {
 		stream.RegisterStreamGreeterServer(grpcServer, StreamGreetServer(0))
 	})
 	server.Start()

+ 1 - 1
example/rpc/server/unary/etc/config.json

@@ -8,6 +8,6 @@
         "Hosts": [
             "localhost:2379"
         ],
-        "Key": "rpcx"
+        "Key": "zrpc"
     }
 }

+ 1 - 1
example/rpc/server/unary/etc/config1.json

@@ -8,6 +8,6 @@
         "Hosts": [
             "localhost:2379"
         ],
-        "Key": "rpcx"
+        "Key": "zrpc"
     }
 }

+ 1 - 1
example/rpc/server/unary/etc/k8s.json

@@ -6,7 +6,7 @@
         "Hosts": [
             "etcd.discov:2379"
         ],
-        "Key": "rpcx"
+        "Key": "zrpc"
     },
     "Timeout": 500
 }

+ 3 - 3
example/rpc/server/unary/server.go

@@ -10,7 +10,7 @@ import (
 
 	"github.com/tal-tech/go-zero/core/conf"
 	"github.com/tal-tech/go-zero/example/rpc/remote/unary"
-	"github.com/tal-tech/go-zero/rpcx"
+	"github.com/tal-tech/go-zero/zrpc"
 	"google.golang.org/grpc"
 )
 
@@ -44,10 +44,10 @@ func (gs *GreetServer) Greet(ctx context.Context, req *unary.Request) (*unary.Re
 func main() {
 	flag.Parse()
 
-	var c rpcx.RpcServerConf
+	var c zrpc.RpcServerConf
 	conf.MustLoad(*configFile, &c)
 
-	server := rpcx.MustNewServer(c, func(grpcServer *grpc.Server) {
+	server := zrpc.MustNewServer(c, func(grpcServer *grpc.Server) {
 		unary.RegisterGreeterServer(grpcServer, NewGreetServer())
 	})
 	server.Start()

+ 2 - 2
example/shorturl/api/internal/config/config.go

@@ -2,10 +2,10 @@ package config
 
 import (
 	"github.com/tal-tech/go-zero/rest"
-	"github.com/tal-tech/go-zero/rpcx"
+	"github.com/tal-tech/go-zero/zrpc"
 )
 
 type Config struct {
 	rest.RestConf
-	Transform rpcx.RpcClientConf
+	Transform zrpc.RpcClientConf
 }

+ 2 - 2
example/shorturl/api/internal/svc/servicecontext.go

@@ -4,7 +4,7 @@ import (
 	"shorturl/api/internal/config"
 	"shorturl/rpc/transform/transformer"
 
-	"github.com/tal-tech/go-zero/rpcx"
+	"github.com/tal-tech/go-zero/zrpc"
 )
 
 type ServiceContext struct {
@@ -15,6 +15,6 @@ type ServiceContext struct {
 func NewServiceContext(c config.Config) *ServiceContext {
 	return &ServiceContext{
 		Config:      c,
-		Transformer: transformer.NewTransformer(rpcx.MustNewClient(c.Transform)),
+		Transformer: transformer.NewTransformer(zrpc.MustNewClient(c.Transform)),
 	}
 }

+ 2 - 2
example/shorturl/rpc/transform/internal/config/config.go

@@ -2,11 +2,11 @@ package config
 
 import (
 	"github.com/tal-tech/go-zero/core/stores/cache"
-	"github.com/tal-tech/go-zero/rpcx"
+	"github.com/tal-tech/go-zero/zrpc"
 )
 
 type Config struct {
-	rpcx.RpcServerConf
+	zrpc.RpcServerConf
 	DataSource string
 	Table      string
 	Cache      cache.CacheConf

+ 2 - 2
example/shorturl/rpc/transform/transform.go

@@ -14,7 +14,7 @@ import (
 	transform "shorturl/rpc/transform/pb"
 
 	"github.com/tal-tech/go-zero/core/conf"
-	"github.com/tal-tech/go-zero/rpcx"
+	"github.com/tal-tech/go-zero/zrpc"
 	"google.golang.org/grpc"
 )
 
@@ -28,7 +28,7 @@ func main() {
 	ctx := svc.NewServiceContext(c)
 	transformerSrv := server.NewTransformerServer(ctx)
 
-	s, err := rpcx.NewServer(c.RpcServerConf, func(grpcServer *grpc.Server) {
+	s, err := zrpc.NewServer(c.RpcServerConf, func(grpcServer *grpc.Server) {
 		transform.RegisterTransformerServer(grpcServer, transformerSrv)
 	})
 	if err != nil {

+ 3 - 3
example/shorturl/rpc/transform/transformer/transformer.go

@@ -11,7 +11,7 @@ import (
 	transform "shorturl/rpc/transform/pb"
 
 	"github.com/tal-tech/go-zero/core/jsonx"
-	"github.com/tal-tech/go-zero/rpcx"
+	"github.com/tal-tech/go-zero/zrpc"
 )
 
 type (
@@ -21,11 +21,11 @@ type (
 	}
 
 	defaultTransformer struct {
-		cli rpcx.Client
+		cli zrpc.Client
 	}
 )
 
-func NewTransformer(cli rpcx.Client) Transformer {
+func NewTransformer(cli zrpc.Client) Transformer {
 	return &defaultTransformer{
 		cli: cli,
 	}

+ 4 - 4
example/tracing/edge/main.go

@@ -10,17 +10,17 @@ import (
 	"github.com/tal-tech/go-zero/example/tracing/remote/portal"
 	"github.com/tal-tech/go-zero/rest"
 	"github.com/tal-tech/go-zero/rest/httpx"
-	"github.com/tal-tech/go-zero/rpcx"
+	"github.com/tal-tech/go-zero/zrpc"
 )
 
 var (
 	configFile = flag.String("f", "config.json", "the config file")
-	client     rpcx.Client
+	client     zrpc.Client
 )
 
 type Config struct {
 	rest.RestConf
-	Portal rpcx.RpcClientConf
+	Portal zrpc.RpcClientConf
 }
 
 func handle(w http.ResponseWriter, r *http.Request) {
@@ -41,7 +41,7 @@ func main() {
 
 	var c Config
 	conf.MustLoad(*configFile, &c)
-	client = rpcx.MustNewClient(c.Portal)
+	client = zrpc.MustNewClient(c.Portal)
 	engine := rest.MustNewServer(rest.RestConf{
 		ServiceConf: service.ServiceConf{
 			Log: logx.LogConf{

+ 7 - 7
example/tracing/portal/server.go

@@ -7,7 +7,7 @@ import (
 	"github.com/tal-tech/go-zero/core/conf"
 	"github.com/tal-tech/go-zero/example/tracing/remote/portal"
 	"github.com/tal-tech/go-zero/example/tracing/remote/user"
-	"github.com/tal-tech/go-zero/rpcx"
+	"github.com/tal-tech/go-zero/zrpc"
 	"google.golang.org/grpc"
 )
 
@@ -15,16 +15,16 @@ var configFile = flag.String("f", "etc/config.json", "the config file")
 
 type (
 	Config struct {
-		rpcx.RpcServerConf
-		UserRpc rpcx.RpcClientConf
+		zrpc.RpcServerConf
+		UserRpc zrpc.RpcClientConf
 	}
 
 	PortalServer struct {
-		userRpc rpcx.Client
+		userRpc zrpc.Client
 	}
 )
 
-func NewPortalServer(client rpcx.Client) *PortalServer {
+func NewPortalServer(client zrpc.Client) *PortalServer {
 	return &PortalServer{
 		userRpc: client,
 	}
@@ -53,8 +53,8 @@ func main() {
 	var c Config
 	conf.MustLoad(*configFile, &c)
 
-	client := rpcx.MustNewClient(c.UserRpc)
-	server := rpcx.MustNewServer(c.RpcServerConf, func(grpcServer *grpc.Server) {
+	client := zrpc.MustNewClient(c.UserRpc)
+	server := zrpc.MustNewServer(c.RpcServerConf, func(grpcServer *grpc.Server) {
 		portal.RegisterPortalServer(grpcServer, NewPortalServer(client))
 	})
 	server.Start()

+ 3 - 3
example/tracing/user/server.go

@@ -10,7 +10,7 @@ import (
 
 	"github.com/tal-tech/go-zero/core/conf"
 	"github.com/tal-tech/go-zero/example/tracing/remote/user"
-	"github.com/tal-tech/go-zero/rpcx"
+	"github.com/tal-tech/go-zero/zrpc"
 	"google.golang.org/grpc"
 )
 
@@ -44,10 +44,10 @@ func (gs *UserServer) GetGrade(ctx context.Context, req *user.UserRequest) (*use
 func main() {
 	flag.Parse()
 
-	var c rpcx.RpcServerConf
+	var c zrpc.RpcServerConf
 	conf.MustLoad(*configFile, &c)
 
-	server := rpcx.MustNewServer(c, func(grpcServer *grpc.Server) {
+	server := zrpc.MustNewServer(c, func(grpcServer *grpc.Server) {
 		user.RegisterUserServer(grpcServer, NewUserServer())
 	})
 	server.Start()

+ 1 - 1
rest/config.go

@@ -20,7 +20,7 @@ type (
 
 	// why not name it as Conf, because we need to consider usage like:
 	// type Config struct {
-	//     rpcx.RpcConf
+	//     zrpc.RpcConf
 	//     rest.RestConf
 	// }
 	// if with the name Conf, there will be two Conf inside Config.

+ 3 - 3
tools/goctl/rpc/README.md

@@ -220,11 +220,11 @@ OPTIONS:
     *rrBalanced does not implement Picker (wrong type for Pick method)
 		have Pick(context.Context, balancer.PickInfo) (balancer.SubConn, func(balancer.DoneInfo), error)
     want Pick(balancer.PickInfo) (balancer.PickResult, error)
-    #github.com/tal-tech/go-zero/rpcx/internal/balancer/p2c
-    ../../../go/pkg/mod/github.com/tal-tech/go-zero@v1.0.12/rpcx/internal/balancer/p2c/p2c.go:41:32: not enough arguments in call to base.NewBalancerBuilder
+    #github.com/tal-tech/go-zero/zrpc/internal/balancer/p2c
+    ../../../go/pkg/mod/github.com/tal-tech/go-zero@v1.0.12/zrpc/internal/balancer/p2c/p2c.go:41:32: not enough arguments in call to base.NewBalancerBuilder
 	have (string, *p2cPickerBuilder)
   want (string, base.PickerBuilder, base.Config)
-  ../../../go/pkg/mod/github.com/tal-tech/go-zero@v1.0.12/rpcx/internal/balancer/p2c/p2c.go:58:9: cannot use &p2cPicker literal (type *p2cPicker) as type balancer.Picker in return argument:
+  ../../../go/pkg/mod/github.com/tal-tech/go-zero@v1.0.12/zrpc/internal/balancer/p2c/p2c.go:58:9: cannot use &p2cPicker literal (type *p2cPicker) as type balancer.Picker in return argument:
 	*p2cPicker does not implement balancer.Picker (wrong type for Pick method)
 		have Pick(context.Context, balancer.PickInfo) (balancer.SubConn, func(balancer.DoneInfo), error)
 		want Pick(balancer.PickInfo) (balancer.PickResult, error)

+ 3 - 3
tools/goctl/rpc/gen/gencall.go

@@ -25,7 +25,7 @@ import (
 	{{.package}}
 
 	"github.com/tal-tech/go-zero/core/jsonx"
-	"github.com/tal-tech/go-zero/rpcx"
+	"github.com/tal-tech/go-zero/zrpc"
 )
 
 type (
@@ -34,11 +34,11 @@ type (
 	}
 
 	default{{.serviceName}} struct {
-		cli rpcx.Client
+		cli zrpc.Client
 	}
 )
 
-func New{{.serviceName}}(cli rpcx.Client) {{.serviceName}} {
+func New{{.serviceName}}(cli zrpc.Client) {{.serviceName}} {
 	return &default{{.serviceName}}{
 		cli: cli,
 	}

+ 2 - 2
tools/goctl/rpc/gen/genconfig.go

@@ -10,10 +10,10 @@ import (
 
 const configTemplate = `package config
 
-import "github.com/tal-tech/go-zero/rpcx"
+import "github.com/tal-tech/go-zero/zrpc"
 
 type Config struct {
-	rpcx.RpcServerConf
+	zrpc.RpcServerConf
 }
 `
 

+ 2 - 2
tools/goctl/rpc/gen/genmain.go

@@ -21,7 +21,7 @@ import (
 
 	"github.com/tal-tech/go-zero/core/conf"
 	"github.com/tal-tech/go-zero/core/logx"
-	"github.com/tal-tech/go-zero/rpcx"
+	"github.com/tal-tech/go-zero/zrpc"
 	"google.golang.org/grpc"
 )
 
@@ -35,7 +35,7 @@ func main() {
 	ctx := svc.NewServiceContext(c)
 	{{.srv}}
 
-	s, err := rpcx.NewServer(c.RpcServerConf, func(grpcServer *grpc.Server) {
+	s, err := zrpc.NewServer(c.RpcServerConf, func(grpcServer *grpc.Server) {
 		{{.registers}}
 	})
 	logx.Must(err)

+ 3 - 3
rpcx/client.go → zrpc/client.go

@@ -1,12 +1,12 @@
-package rpcx
+package zrpc
 
 import (
 	"log"
 	"time"
 
 	"github.com/tal-tech/go-zero/core/discov"
-	"github.com/tal-tech/go-zero/rpcx/internal"
-	"github.com/tal-tech/go-zero/rpcx/internal/auth"
+	"github.com/tal-tech/go-zero/zrpc/internal"
+	"github.com/tal-tech/go-zero/zrpc/internal/auth"
 	"google.golang.org/grpc"
 )
 

+ 2 - 2
rpcx/client_test.go → zrpc/client_test.go

@@ -1,4 +1,4 @@
-package rpcx
+package zrpc
 
 import (
 	"context"
@@ -9,7 +9,7 @@ import (
 
 	"github.com/stretchr/testify/assert"
 	"github.com/tal-tech/go-zero/core/logx"
-	"github.com/tal-tech/go-zero/rpcx/internal/mock"
+	"github.com/tal-tech/go-zero/zrpc/internal/mock"
 	"google.golang.org/grpc"
 	"google.golang.org/grpc/codes"
 	"google.golang.org/grpc/status"

+ 1 - 1
rpcx/config.go → zrpc/config.go

@@ -1,4 +1,4 @@
-package rpcx
+package zrpc
 
 import (
 	"github.com/tal-tech/go-zero/core/discov"

+ 1 - 1
rpcx/config_test.go → zrpc/config_test.go

@@ -1,4 +1,4 @@
-package rpcx
+package zrpc
 
 import (
 	"testing"

+ 0 - 0
rpcx/internal/auth/auth.go → zrpc/internal/auth/auth.go


+ 0 - 0
rpcx/internal/auth/credential.go → zrpc/internal/auth/credential.go


+ 0 - 0
rpcx/internal/auth/credential_test.go → zrpc/internal/auth/credential_test.go


+ 0 - 0
rpcx/internal/auth/vars.go → zrpc/internal/auth/vars.go


+ 1 - 1
rpcx/internal/balancer/p2c/p2c.go → zrpc/internal/balancer/p2c/p2c.go

@@ -13,7 +13,7 @@ import (
 	"github.com/tal-tech/go-zero/core/logx"
 	"github.com/tal-tech/go-zero/core/syncx"
 	"github.com/tal-tech/go-zero/core/timex"
-	"github.com/tal-tech/go-zero/rpcx/internal/codes"
+	"github.com/tal-tech/go-zero/zrpc/internal/codes"
 	"google.golang.org/grpc/balancer"
 	"google.golang.org/grpc/balancer/base"
 	"google.golang.org/grpc/resolver"

+ 0 - 0
rpcx/internal/balancer/p2c/p2c_test.go → zrpc/internal/balancer/p2c/p2c_test.go


+ 0 - 0
rpcx/internal/chainclientinterceptors.go → zrpc/internal/chainclientinterceptors.go


+ 0 - 0
rpcx/internal/chainclientinterceptors_test.go → zrpc/internal/chainclientinterceptors_test.go


+ 0 - 0
rpcx/internal/chainserverinterceptors.go → zrpc/internal/chainserverinterceptors.go


+ 0 - 0
rpcx/internal/chainserverinterceptors_test.go → zrpc/internal/chainserverinterceptors_test.go


+ 3 - 3
rpcx/internal/client.go → zrpc/internal/client.go

@@ -5,9 +5,9 @@ import (
 	"fmt"
 	"time"
 
-	"github.com/tal-tech/go-zero/rpcx/internal/balancer/p2c"
-	"github.com/tal-tech/go-zero/rpcx/internal/clientinterceptors"
-	"github.com/tal-tech/go-zero/rpcx/internal/resolver"
+	"github.com/tal-tech/go-zero/zrpc/internal/balancer/p2c"
+	"github.com/tal-tech/go-zero/zrpc/internal/clientinterceptors"
+	"github.com/tal-tech/go-zero/zrpc/internal/resolver"
 	"google.golang.org/grpc"
 )
 

+ 0 - 0
rpcx/internal/client_test.go → zrpc/internal/client_test.go


+ 1 - 1
rpcx/internal/clientinterceptors/breakerinterceptor.go → zrpc/internal/clientinterceptors/breakerinterceptor.go

@@ -5,7 +5,7 @@ import (
 	"path"
 
 	"github.com/tal-tech/go-zero/core/breaker"
-	"github.com/tal-tech/go-zero/rpcx/internal/codes"
+	"github.com/tal-tech/go-zero/zrpc/internal/codes"
 	"google.golang.org/grpc"
 )
 

+ 1 - 1
rpcx/internal/clientinterceptors/breakerinterceptor_test.go → zrpc/internal/clientinterceptors/breakerinterceptor_test.go

@@ -8,7 +8,7 @@ import (
 	"github.com/stretchr/testify/assert"
 	"github.com/tal-tech/go-zero/core/breaker"
 	"github.com/tal-tech/go-zero/core/stat"
-	rcodes "github.com/tal-tech/go-zero/rpcx/internal/codes"
+	rcodes "github.com/tal-tech/go-zero/zrpc/internal/codes"
 	"google.golang.org/grpc"
 	"google.golang.org/grpc/codes"
 	"google.golang.org/grpc/status"

+ 0 - 0
rpcx/internal/clientinterceptors/durationinterceptor.go → zrpc/internal/clientinterceptors/durationinterceptor.go


+ 0 - 0
rpcx/internal/clientinterceptors/durationinterceptor_test.go → zrpc/internal/clientinterceptors/durationinterceptor_test.go


+ 0 - 0
rpcx/internal/clientinterceptors/prommetricinterceptor.go → zrpc/internal/clientinterceptors/prommetricinterceptor.go


+ 0 - 0
rpcx/internal/clientinterceptors/prommetricinterceptor_test.go → zrpc/internal/clientinterceptors/prommetricinterceptor_test.go


+ 0 - 0
rpcx/internal/clientinterceptors/timeoutinterceptor.go → zrpc/internal/clientinterceptors/timeoutinterceptor.go


+ 0 - 0
rpcx/internal/clientinterceptors/timeoutinterceptor_test.go → zrpc/internal/clientinterceptors/timeoutinterceptor_test.go


+ 0 - 0
rpcx/internal/clientinterceptors/tracinginterceptor.go → zrpc/internal/clientinterceptors/tracinginterceptor.go


+ 0 - 0
rpcx/internal/clientinterceptors/tracinginterceptor_test.go → zrpc/internal/clientinterceptors/tracinginterceptor_test.go


+ 0 - 0
rpcx/internal/codes/accept.go → zrpc/internal/codes/accept.go


+ 0 - 0
rpcx/internal/codes/accept_test.go → zrpc/internal/codes/accept_test.go


+ 0 - 0
rpcx/internal/mock/deposit.pb.go → zrpc/internal/mock/deposit.pb.go


+ 0 - 0
rpcx/internal/mock/deposit.proto → zrpc/internal/mock/deposit.proto


+ 0 - 0
rpcx/internal/mock/depositserver.go → zrpc/internal/mock/depositserver.go


+ 0 - 0
rpcx/internal/resolver/directbuilder.go → zrpc/internal/resolver/directbuilder.go


+ 0 - 0
rpcx/internal/resolver/directbuilder_test.go → zrpc/internal/resolver/directbuilder_test.go


+ 0 - 0
rpcx/internal/resolver/discovbuilder.go → zrpc/internal/resolver/discovbuilder.go


+ 0 - 0
rpcx/internal/resolver/resolver.go → zrpc/internal/resolver/resolver.go


+ 0 - 0
rpcx/internal/resolver/resolver_test.go → zrpc/internal/resolver/resolver_test.go


+ 0 - 0
rpcx/internal/resolver/subset.go → zrpc/internal/resolver/subset.go


+ 0 - 0
rpcx/internal/resolver/subset_test.go → zrpc/internal/resolver/subset_test.go


+ 0 - 0
rpcx/internal/rpclogger.go → zrpc/internal/rpclogger.go


+ 0 - 0
rpcx/internal/rpcpubserver.go → zrpc/internal/rpcpubserver.go


+ 1 - 1
rpcx/internal/rpcserver.go → zrpc/internal/rpcserver.go

@@ -5,7 +5,7 @@ import (
 
 	"github.com/tal-tech/go-zero/core/proc"
 	"github.com/tal-tech/go-zero/core/stat"
-	"github.com/tal-tech/go-zero/rpcx/internal/serverinterceptors"
+	"github.com/tal-tech/go-zero/zrpc/internal/serverinterceptors"
 	"google.golang.org/grpc"
 )
 

+ 0 - 0
rpcx/internal/rpcserver_test.go → zrpc/internal/rpcserver_test.go


+ 0 - 0
rpcx/internal/server.go → zrpc/internal/server.go


+ 0 - 0
rpcx/internal/server_test.go → zrpc/internal/server_test.go


+ 1 - 1
rpcx/internal/serverinterceptors/authinterceptor.go → zrpc/internal/serverinterceptors/authinterceptor.go

@@ -3,7 +3,7 @@ package serverinterceptors
 import (
 	"context"
 
-	"github.com/tal-tech/go-zero/rpcx/internal/auth"
+	"github.com/tal-tech/go-zero/zrpc/internal/auth"
 	"google.golang.org/grpc"
 )
 

+ 1 - 1
rpcx/internal/serverinterceptors/authinterceptor_test.go → zrpc/internal/serverinterceptors/authinterceptor_test.go

@@ -7,7 +7,7 @@ import (
 	"github.com/alicebob/miniredis"
 	"github.com/stretchr/testify/assert"
 	"github.com/tal-tech/go-zero/core/stores/redis"
-	"github.com/tal-tech/go-zero/rpcx/internal/auth"
+	"github.com/tal-tech/go-zero/zrpc/internal/auth"
 	"google.golang.org/grpc"
 	"google.golang.org/grpc/metadata"
 )

+ 0 - 0
rpcx/internal/serverinterceptors/crashinterceptor.go → zrpc/internal/serverinterceptors/crashinterceptor.go


+ 0 - 0
rpcx/internal/serverinterceptors/crashinterceptor_test.go → zrpc/internal/serverinterceptors/crashinterceptor_test.go


+ 0 - 0
rpcx/internal/serverinterceptors/prommetricinterceptor.go → zrpc/internal/serverinterceptors/prommetricinterceptor.go


+ 0 - 0
rpcx/internal/serverinterceptors/prommetricinterceptor_test.go → zrpc/internal/serverinterceptors/prommetricinterceptor_test.go


+ 0 - 0
rpcx/internal/serverinterceptors/sheddinginterceptor.go → zrpc/internal/serverinterceptors/sheddinginterceptor.go


+ 0 - 0
rpcx/internal/serverinterceptors/sheddinginterceptor_test.go → zrpc/internal/serverinterceptors/sheddinginterceptor_test.go


+ 0 - 0
rpcx/internal/serverinterceptors/statinterceptor.go → zrpc/internal/serverinterceptors/statinterceptor.go


برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است