public static String getKey()

in mode/cluster/repository/nacos/src/main/java/org/apache/shardingsphere/mode/repository/cluster/nacos/util/NacosMetaDataUtils.java [74:81]


    public static String getKey(final Instance instance) {
        return instance.getMetadata().keySet().stream()
                .filter(entryKey -> !PreservedMetadataKeys.HEART_BEAT_INTERVAL.equals(entryKey)
                        && !PreservedMetadataKeys.HEART_BEAT_TIMEOUT.equals(entryKey)
                        && !PreservedMetadataKeys.IP_DELETE_TIMEOUT.equals(entryKey)
                        && !UTC_ZONE_OFFSET.toString().equals(entryKey))
                .findFirst().orElseThrow(() -> new NacosException(NacosException.RESOURCE_NOT_FOUND, "Failed to find key "));
    }