HUB
Sign inSign up
etcdjson logo

arschles/etcdjson

By arschles

•Updated over 11 years ago

modify JSON in etcd

Image
0

589

arschles/etcdjson repository overview

⁠etcdjson

⁠What

This is a pretty simple tool that provides a CLI tool to edit JSON that's stored in Etcd with a JSONPath-like interface.

⁠Why

Because I got tired of getting JSON data from Etcd, storing it in a file, editing it, and then setting the new data.

⁠Details

This tool has get and set. It's not concurrency safe for a key, so use it from 1 node at a time to edit some JSON stored in a key.

⁠Commands

Assuming this JSON is stored in /config/json in Etcd

{
  "a": {
    "b": "c"
  }
}
⁠get

etcdjson get /config/json a.b returns c

⁠Set

etcdjson set /config/json a.b d returns success and makes the JSON look like this:

{
  "a": {
    "b": "d"
  }
}
Tag summary
Recent tags
Content type
Image
Digest
sha256:dd1263326…
Size
4.5 MB
Last updated
over 11 years ago
docker pull arschles/etcdjson:latest