package capnp-rpc-unix

  1. Overview
  2. Docs

An on-disk store for saved services.

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.

OCaml

Innovation. Community. Security.