Skip to content

Instantly share code, notes, and snippets.

@monkeygroover
Created September 16, 2018 16:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save monkeygroover/768edcb4908b05703d8334ec55502827 to your computer and use it in GitHub Desktop.
Save monkeygroover/768edcb4908b05703d8334ec55502827 to your computer and use it in GitHub Desktop.
read consul nodes and addresses
(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