static ClosableResolver<AwsEndpoint> defaultBootstrapResolver(final EurekaClientConfig clientConfig,
                                                                  final InstanceInfo myInstanceInfo) {
        String[] availZones = clientConfig.getAvailabilityZones(clientConfig.getRegion());
        String myZone = InstanceInfo.getZone(availZones, myInstanceInfo);

        ClusterResolver<AwsEndpoint> delegateResolver = new ZoneAffinityClusterResolver(
                new ConfigClusterResolver(clientConfig, myInstanceInfo),
                myZone,
                true
        );

        List<AwsEndpoint> initialValue = delegateResolver.getClusterEndpoints();
        if (initialValue.isEmpty()) {
            String msg = "Initial resolution of Eureka server endpoints failed. Check ConfigClusterResolver logs for more info";
            logger.error(msg);
            failFastOnInitCheck(clientConfig, msg);
        }

        return new AsyncResolver<>(
                EurekaClientNames.BOOTSTRAP,
                delegateResolver,
                initialValue,
                1,
                clientConfig.getEurekaServiceUrlPollIntervalSeconds() * 1000
        );
    }
static ClosableResolver < AwsEndpoint > defaultBootstrapResolver ( final EurekaClientConfig clientConfig , final InstanceInfo myInstanceInfo ) { String [ ] availZones = clientConfig . getAvailabilityZones ( clientConfig . getRegion ( ) ) ; String myZone = InstanceInfo . getZone ( availZones , myInstanceInfo ) ; ClusterResolver < AwsEndpoint > delegateResolver = new ZoneAffinityClusterResolver ( new ConfigClusterResolver ( clientConfig , myInstanceInfo ) , myZone , true ) ; List < AwsEndpoint > initialValue = delegateResolver . getClusterEndpoints ( ) ; if ( initialValue . isEmpty ( ) ) { String msg = "Initial resolution of Eureka server endpoints failed. Check ConfigClusterResolver logs for more info" ; logger . error ( msg ) ; failFastOnInitCheck ( clientConfig , msg ) ; } return new AsyncResolver < > ( EurekaClientNames . BOOTSTRAP , delegateResolver , initialValue , 1 , clientConfig . getEurekaServiceUrlPollIntervalSeconds ( ) * 1000 ) ; }
@return a bootstrap resolver that resolves eureka server endpoints based on either DNS or static config,
depending on configuration for one or the other. This resolver will warm up at the start.