aboutsummaryrefslogtreecommitdiff
path: root/script/jepsen.garage/src/jepsen/garage/reg.clj
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-10-18 16:30:45 +0200
committerAlex Auvolat <alex@adnab.me>2023-10-18 16:30:45 +0200
commitddd3de7fcef2a2e05805766085c156d7fde9e12e (patch)
tree27d9c3db3035e2432830912bd693744084d4f682 /script/jepsen.garage/src/jepsen/garage/reg.clj
parent84d43501ce6dfd645d844ada0fcbff932d6fea76 (diff)
downloadgarage-ddd3de7fcef2a2e05805766085c156d7fde9e12e.tar.gz
garage-ddd3de7fcef2a2e05805766085c156d7fde9e12e.zip
refactor jepsen code
Diffstat (limited to 'script/jepsen.garage/src/jepsen/garage/reg.clj')
-rw-r--r--script/jepsen.garage/src/jepsen/garage/reg.clj9
1 files changed, 5 insertions, 4 deletions
diff --git a/script/jepsen.garage/src/jepsen/garage/reg.clj b/script/jepsen.garage/src/jepsen/garage/reg.clj
index 0b370b36..3a2c1d55 100644
--- a/script/jepsen.garage/src/jepsen/garage/reg.clj
+++ b/script/jepsen.garage/src/jepsen/garage/reg.clj
@@ -13,7 +13,8 @@
[jepsen.checker.timeline :as timeline]
[jepsen.control.util :as cu]
[jepsen.os.debian :as debian]
- [jepsen.garage.grg :as grg]
+ [jepsen.garage.daemon :as grg]
+ [jepsen.garage.s3api :as s3]
[knossos.model :as model]
[slingshot.slingshot :refer [try+]]))
@@ -24,7 +25,7 @@
(defrecord RegClient [creds]
client/Client
(open! [this test node]
- (let [creds (grg/s3-creds node)]
+ (let [creds (grg/creds node)]
(info node "s3 credentials:" creds)
(assoc this :creds creds)))
(setup! [this test])
@@ -32,11 +33,11 @@
(let [[k v] (:value op)]
(case (:f op)
:read
- (let [value (grg/s3-get (:creds this) k)]
+ (let [value (s3/get (:creds this) k)]
(assoc op :type :ok, :value (independent/tuple k value)))
:write
(do
- (grg/s3-put (:creds this) k v)
+ (s3/put (:creds this) k v)
(assoc op :type :ok)))))
(teardown! [this test])
(close! [this test]))