diff options
| author | Estevan Castilho <tevo@riajuu.net> | 2026-07-09 00:33:37 +0000 |
|---|---|---|
| committer | Estevan Castilho <tevo@riajuu.net> | 2026-07-09 00:33:37 +0000 |
| commit | 2566cfae03199f8e90098c84b712d48182d9b806 (patch) | |
| tree | 4209d319e67f0f055e5055bc67a022bfdb3dd43f /lib/abstract/Storage.ml | |
| parent | 5a799734ddd523027a7d6ef8b0acab6d0b796ec6 (diff) | |
| download | RNT-2566cfae03199f8e90098c84b712d48182d9b806.tar.gz RNT-2566cfae03199f8e90098c84b712d48182d9b806.zip | |
Interface for the storage layer
Diffstat (limited to '')
| -rw-r--r-- | lib/abstract/Storage.ml | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/abstract/Storage.ml b/lib/abstract/Storage.ml new file mode 100644 index 0000000..d0f2097 --- /dev/null +++ b/lib/abstract/Storage.ml @@ -0,0 +1,18 @@ +module type STORAGE = sig + type connection + type transaction + + val connect: Concepts.Configuration.configuration -> connection + + (** begin a transaction within `connection` *) + val start: connection -> transaction + (** `commit` the current transaction *) + val commit: transaction -> () + (** `abort` the current transaction *) + val abort: transaction -> () + + (** within a transaction, fetch a blob from disk *) + val get: transaction -> Concepts.Hash.hash -> Concepts.Representation.blob + (** within a transaction, associate a hash with a blob on disk *) + val put: transaction -> Concepts.Hash.hash -> Concepts.Representation.blob -> () +end |
