Created
September 16, 2018 16:15
-
-
Save monkeygroover/768edcb4908b05703d8334ec55502827 to your computer and use it in GitHub Desktop.
read consul nodes and addresses
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(reduce conj {} (map #(let [{node "Node" address "Address"} %] {address node}) | |
(json/read-str (slurp "http://localhost:8500/v1/catalog/nodes")))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment