aboutsummaryrefslogtreecommitdiffstats
path: root/lib/abstract/Storage.ml
diff options
context:
space:
mode:
authorEstevan Castilho <tevo@riajuu.net>2026-08-15 00:09:22 +0000
committerEstevan Castilho <tevo@riajuu.net>2026-08-23 03:06:56 +0000
commit5a4f7d5ed6e5d6b2711db316e8de06cea78b54ec (patch)
tree5a6372324f12858775848e169eace7be52a86101 /lib/abstract/Storage.ml
parent403f1a62f66c33a7d39c17704f34debe579c89b0 (diff)
downloadRNT-5a4f7d5ed6e5d6b2711db316e8de06cea78b54ec.tar.gz
RNT-5a4f7d5ed6e5d6b2711db316e8de06cea78b54ec.zip
Allow storage backend addresses to be labels rather than hashes
Diffstat (limited to 'lib/abstract/Storage.ml')
-rw-r--r--lib/abstract/Storage.ml6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/abstract/Storage.ml b/lib/abstract/Storage.ml
index 5eaeba3..c936be4 100644
--- a/lib/abstract/Storage.ml
+++ b/lib/abstract/Storage.ml
@@ -7,6 +7,8 @@ module type STORAGE = sig
type connection
type transaction
+ type address = Label of string | Hash of Concepts.Hash.hash
+
val connect : Concepts.Configuration.term -> (connection, Concepts.Condition.condition) result
(** begin a transaction within `connection` *)
@@ -21,13 +23,13 @@ module type STORAGE = sig
(** within a transaction, fetch a blob from disk *)
val get :
transaction ->
- Concepts.Hash.hash ->
+ address ->
(Concepts.Representation.blob option, Concepts.Condition.condition) result
(** within a transaction, associate a hash with a blob on disk *)
val put :
transaction ->
- Concepts.Hash.hash ->
+ address ->
Concepts.Representation.blob ->
(unit, Concepts.Condition.condition) result
end