From 75c2b2cfd0efdd990de94a5cb7e91242e646db2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=98=8E=E6=9C=97?= <30825490+1182640071@users.noreply.github.com> Date: Thu, 10 Aug 2023 14:43:55 +0800 Subject: [PATCH] add token (#46) Co-authored-by: wangminglang@kanzhun.com --- .../polaris/grpc/server/PolarisGrpcServer.java | 1 + .../grpc/server/PolarisGrpcServerBuilder.java | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/grpc-java-polaris/src/main/java/com/tencent/polaris/grpc/server/PolarisGrpcServer.java b/grpc-java-polaris/src/main/java/com/tencent/polaris/grpc/server/PolarisGrpcServer.java index 49481f5..d07369b 100644 --- a/grpc-java-polaris/src/main/java/com/tencent/polaris/grpc/server/PolarisGrpcServer.java +++ b/grpc-java-polaris/src/main/java/com/tencent/polaris/grpc/server/PolarisGrpcServer.java @@ -188,6 +188,7 @@ private void registerOne(String serviceName) { request.setNamespace(builder.getNamespace()); request.setService(serviceName); request.setHost(host); + request.setToken(builder.getToken()); request.setVersion(builder.getVersion()); request.setProtocol("grpc"); request.setWeight(builder.getWeight()); diff --git a/grpc-java-polaris/src/main/java/com/tencent/polaris/grpc/server/PolarisGrpcServerBuilder.java b/grpc-java-polaris/src/main/java/com/tencent/polaris/grpc/server/PolarisGrpcServerBuilder.java index dcbb88c..0370814 100644 --- a/grpc-java-polaris/src/main/java/com/tencent/polaris/grpc/server/PolarisGrpcServerBuilder.java +++ b/grpc-java-polaris/src/main/java/com/tencent/polaris/grpc/server/PolarisGrpcServerBuilder.java @@ -60,6 +60,8 @@ public final class PolarisGrpcServerBuilder extends ServerBuilder