capnp-rpc-unix

Cap'n Proto is a capability-based RPC system with bindings for many languages
Library capnp-rpc-unix
type 'a t

A store of values of type 'a.

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.