Capnp_rpc_unix.File_store
An on-disk store for saved services.
val create : string -> 'a t
create dir
is a store for Cap'n Proto structs. Items are stored inside dir
.
val save :
'a t ->
digest:string ->
'a Capnp_rpc_lwt.StructStorage.reader_t ->
unit
save t ~digest data
saves data
to disk in a file named base64_encode digest
.
val load :
'a t ->
digest:string ->
'a Capnp_rpc_lwt.StructStorage.reader_t option
load t ~digest
is the data passed to save t ~digest
, or None
if the digest is not known.
val remove : 'a t -> digest:string -> unit
remove t ~digest
removes the stored data for digest
.