@Test public void testGetHeartbeatClientIp() { String clientIp = "10.10.10.10"; SentinelConfig.setConfig(TransportConfig.HEARTBEAT_CLIENT_IP, clientIp); String ip = TransportConfig.getHeartbeatClientIp(); assertNotNull(ip); assertEquals(clientIp, ip); SentinelConfig.setConfig(TransportConfig.HEARTBEAT_CLIENT_IP, ""); assertTrue(StringUtil.isNotEmpty(TransportConfig.getHeartbeatClientIp())); }
public static String getHeartbeatClientIp() { String ip = SentinelConfig.getConfig(HEARTBEAT_CLIENT_IP); if (StringUtil.isBlank(ip)) { ip = HostNameUtil.getIp(); } return ip; }
TransportConfig { public static String getHeartbeatClientIp() { String ip = SentinelConfig.getConfig(HEARTBEAT_CLIENT_IP); if (StringUtil.isBlank(ip)) { ip = HostNameUtil.getIp(); } return ip; } }
TransportConfig { public static String getHeartbeatClientIp() { String ip = SentinelConfig.getConfig(HEARTBEAT_CLIENT_IP); if (StringUtil.isBlank(ip)) { ip = HostNameUtil.getIp(); } return ip; }  }
TransportConfig { public static String getHeartbeatClientIp() { String ip = SentinelConfig.getConfig(HEARTBEAT_CLIENT_IP); if (StringUtil.isBlank(ip)) { ip = HostNameUtil.getIp(); } return ip; }  static Long getHeartbeatIntervalMs(); static String getConsoleServer(); static int getRuntimePort(); static String getPort(); static void setRuntimePort(int port); static String getHeartbeatClientIp(); }
TransportConfig { public static String getHeartbeatClientIp() { String ip = SentinelConfig.getConfig(HEARTBEAT_CLIENT_IP); if (StringUtil.isBlank(ip)) { ip = HostNameUtil.getIp(); } return ip; }  static Long getHeartbeatIntervalMs(); static String getConsoleServer(); static int getRuntimePort(); static String getPort(); static void setRuntimePort(int port); static String getHeartbeatClientIp(); static final String CONSOLE_SERVER; static final String SERVER_PORT; static final String HEARTBEAT_INTERVAL_MS; static final String HEARTBEAT_CLIENT_IP; }