private static Endpoint endpoint(InstanceInfo instanceInfo, boolean secureVip) {
        final String hostname = instanceInfo.getHostName();
        final PortWrapper portWrapper = instanceInfo.getPort();
        final int port;
        if (secureVip || !portWrapper.isEnabled()) {
            port = instanceInfo.getSecurePort().getPort();
        } else {
            port = portWrapper.getPort();
        }

        assert hostname != null;
        Endpoint endpoint = Endpoint.of(hostname, port);
        final String ipAddr = instanceInfo.getIpAddr();
        if (ipAddr != null && hostname != ipAddr) {
            endpoint = endpoint.withIpAddr(ipAddr);
        }
        return InstanceInfo.setInstanceInfo(endpoint, instanceInfo);
    }
Returns a new {@link EurekaEndpointGroupBuilder} created with the specified {@link HttpPreprocessor}
and path.
eureka/src/main/java/com/linecorp/armeria/client/eureka/EurekaEndpointGroup.java