Skip to content

Instantly share code, notes, and snippets.

@darron
Created October 24, 2014 18:24
Show Gist options
  • Save darron/5c3b84036f6aad0eb43a to your computer and use it in GitHub Desktop.
Save darron/5c3b84036f6aad0eb43a to your computer and use it in GitHub Desktop.
darron@bam:~/consul-test$ cat sites.ctmpl
{{range keyPrefix "test/"}}
{{.Key}} "{{.Value}}"{{end}}
darron@bam:~/consul-test$ cat sites.conf
test/key1 "Testing."
test/key2 "Testing."
test/ ""
darron@bam:~/consul-test$ curl -X PUT -d 'Testing.' http://localhost:8500/v1/kv/test/key3
darron@bam:~/consul-test$ cat sites.conf
test/key1 "Testing."
test/key2 "Testing."
test/key3 "Testing."
test/ ""
darron@bam:~/consul-test$ curl -X PUT -d 'Testing.' http://localhost:8500/v1/kv/test/key4
darron@bam:~/consul-test$ cat sites.conf
test/key1 "Testing."
test/key2 "Testing."
test/key3 "Testing."
test/key4 "Testing."
test/ ""
darron@bam:~/consul-test$ curl -X DELETE http://localhost:8500/v1/kv/test/key2
darron@bam:~/consul-test$ cat sites.conf
test/key1 "Testing."
test/key2 "Testing."
test/key3 "Testing."
test/key4 "Testing."
test/ ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment