aboutsummaryrefslogtreecommitdiff
path: root/src/k2v-client/README.md
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-05-18 22:35:49 +0200
committerAlex Auvolat <alex@adnab.me>2022-05-18 22:35:49 +0200
commit99976e11f880b39c1c57f66c68f19d8c54ad6c1f (patch)
treed0607d9fd176127e3a1733a794ebe95185620486 /src/k2v-client/README.md
parent5367f8adb2aab70a5478c43b93de7051a93d831b (diff)
parent64c193e3dbb536d5d3c2881bc9aebbb3e4e6272e (diff)
downloadgarage-99976e11f880b39c1c57f66c68f19d8c54ad6c1f.tar.gz
garage-99976e11f880b39c1c57f66c68f19d8c54ad6c1f.zip
Merge branch 'main' into admin-api
Diffstat (limited to 'src/k2v-client/README.md')
-rw-r--r--src/k2v-client/README.md25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/k2v-client/README.md b/src/k2v-client/README.md
new file mode 100644
index 00000000..db454805
--- /dev/null
+++ b/src/k2v-client/README.md
@@ -0,0 +1,25 @@
+Example usage:
+```sh
+# all these values can be provided on the cli instead
+export AWS_ACCESS_KEY_ID=GK123456
+export AWS_SECRET_ACCESS_KEY=0123..789
+export AWS_REGION=garage
+export K2V_ENDPOINT=http://172.30.2.1:3903
+export K2V_BUCKET=my-bucket
+
+cargo run --features=cli -- read-range my-partition-key --all
+
+cargo run --features=cli -- insert my-partition-key my-sort-key --text "my string1"
+cargo run --features=cli -- insert my-partition-key my-sort-key --text "my string2"
+cargo run --features=cli -- insert my-partition-key my-sort-key2 --text "my string"
+
+cargo run --features=cli -- read-range my-partition-key --all
+
+causality=$(cargo run --features=cli -- read my-partition-key my-sort-key2 -b | head -n1)
+cargo run --features=cli -- delete my-partition-key my-sort-key2 -c $causality
+
+causality=$(cargo run --features=cli -- read my-partition-key my-sort-key -b | head -n1)
+cargo run --features=cli -- insert my-partition-key my-sort-key --text "my string3" -c $causality
+
+cargo run --features=cli -- read-range my-partition-key --all
+```