package capnp-rpc-net

  1. Overview
  2. Docs
Cap'n Proto is a capability-based RPC system with bindings for many languages

Install

dune-project
 Dependency

Authors

Maintainers

Sources

capnp-rpc-2.1.1.tbz
sha256=6e9675034c8eac5873ed511f9b968db5223278145bb02ac4a970053a53970a48
sha512=2e2eb8389071bdad3ceef1d15200bf28987f13319f754f4d1603828d0d79202b4de90a6eb294f12ee088c7e3b73755286fbe7076b8fd3d0b29644221e0e7e080

doc/capnp-rpc-net/Capnp_rpc_net/Restorer/module-type-LOADER/index.html

Module type Restorer.LOADERSource

type t

A user-provided function to restore services from persistent storage.

val hash : t -> Auth.hash

hash t is the hash to apply to a Restorer.Id.t to get the storage key, which is passed to load. You should use the hash id value to find the item. Note that hash is purely a local security measure - remote peers only see the ID.

val make_sturdy : t -> Id.t -> Uri.t

make_sturdy t id converts an ID to a full URI, by adding the hosting vat's address and fingerprint.

val load : t -> 'a Capnp_rpc.Std.Sturdy_ref.t -> string -> resolution

load t sr digest is called to restore the service with key digest. sr is a sturdy ref that refers to the service, which the service might want to hand out to clients. Note that connecting to sr will block until the loader has returned. The result is cached until its ref-count reaches zero, so the table will never allow two live capabilities for a single Id.t at once. It will also not call load twice in parallel for the same digest.