城中技术栈

#!/bin/bash

json() {
    curl -s "$1" | jq "$2" | sed 's#"##g'
}

json 'http://localhost:8500/v1/catalog/datacenters' '.[]' | while read dc; do
    json "http://localhost:8500/v1/health/like?dc=${dc}&passing=true" '.[].Node.Address' | while read ip; do
        echo curl -X PATCH "http://${ip}:8080/...
THEME_QUARK.BLOG.ITEM.CONTINUE_READING