doleyzi commented on code in PR #10398:
URL: https://github.com/apache/inlong/pull/10398#discussion_r1637837639


##########
inlong-audit/audit-sdk/src/main/java/org/apache/inlong/audit/entity/AuditType.java:
##########
@@ -33,7 +33,7 @@ public enum AuditType {
     KUDU("Kudu"),
     POSTGRES("Postgres"),
     BINLOG("Binlog"),
-    TUBE("Tube"),
+    TUBE_MQ("TUBEMQ"),

Review Comment:
   fixed



##########
inlong-audit/audit-sdk/src/main/java/org/apache/inlong/audit/send/ProxyManager.java:
##########
@@ -42,13 +60,77 @@ public static ProxyManager getInstance() {
     /**
      * update config
      */
-    public void setAuditProxy(HashSet<String> ipPortList) {
+    public synchronized void setAuditProxy(HashSet<String> ipPortList) {
         if (!ipPortList.equals(new HashSet<>(currentIpPorts))) {
             currentIpPorts.clear();
             currentIpPorts.addAll(ipPortList);
         }
     }
 
+    public synchronized void setManagerConfig(AuditComponent component, String 
managerHost, AuthConfig authConfig) {
+        if (!managerHost.endsWith("/")) {
+            managerHost = managerHost + "/";
+        }
+        if (!(managerHost.startsWith("http://";) || 
managerHost.startsWith("https://";))) {
+            managerHost = "http://"; + managerHost;
+        }
+        auditProxyApiUrl = String.format("%s%s", managerHost, 
GET_AUDIT_PROXY_API_PATH);
+        LOGGER.info("Audit Proxy API URL: {}", auditProxyApiUrl);
+
+        this.authConfig = authConfig;
+        this.component = component;
+
+        updateAuditProxy();
+
+        if (autoUpdateAuditProxy) {
+            startTimer();
+            LOGGER.info("Auto Update from manager");

Review Comment:
   Fixed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to