diff --git a/rpcx/internal/authinterceptor.go b/rpcx/internal/serverinterceptors/authinterceptor.go similarity index 96% rename from rpcx/internal/authinterceptor.go rename to rpcx/internal/serverinterceptors/authinterceptor.go index d59e0158..7cea029f 100644 --- a/rpcx/internal/authinterceptor.go +++ b/rpcx/internal/serverinterceptors/authinterceptor.go @@ -1,4 +1,4 @@ -package internal +package serverinterceptors import ( "context" diff --git a/rpcx/server.go b/rpcx/server.go index 76dc086f..040808bb 100644 --- a/rpcx/server.go +++ b/rpcx/server.go @@ -117,8 +117,8 @@ func setupInterceptors(server internal.Server, c RpcServerConf, metrics *stat.Me return err } - server.AddStreamInterceptors(internal.StreamAuthorizeInterceptor(authenticator)) - server.AddUnaryInterceptors(internal.UnaryAuthorizeInterceptor(authenticator)) + server.AddStreamInterceptors(serverinterceptors.StreamAuthorizeInterceptor(authenticator)) + server.AddUnaryInterceptors(serverinterceptors.UnaryAuthorizeInterceptor(authenticator)) } return nil