package plebeia

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Plebeia.SnapshotSource

Sourcetype snapshot

The type for snapshot. Using Seq.t inside

Sourceval encoding : int -> t Data_encoding.encoding
Sourceval seq : node:(Node_type.t -> [< `Hash of Hash.t | `View of Node_type.view ]) -> Node_type.t -> t

Lazy dump of a node and its subnodes

Sourceval save : Lwt_unix.file_descr -> Context.t -> Node_type.t -> unit Lwt.t

Dump the snapshot of Plebeia tree to file_descr.

To reduce the size of the snapshot, it performs perfect hash-consing.

Sourceval save_gen : Lwt_unix.file_descr -> int -> node:(Node_type.t -> [ `Hash of Hash.t | `View of Node_type.view ]) -> Node_type.t -> unit Lwt.t

Generalized version of save, specifiable how to handle Disk nodes.

node function is to preprocess each node. It is to, for example, * load Disk * load the hash for hashconsing * replace the node by Hash to stop traversal

Load the snapshot file of Plebeia tree from reader.

The entire tree is node-hash computed.

The entire tree is loaded on memory.

load returns a boolean with the loaded node, which indicates whether the node contains Hash _ or not.

Sourceval load' : Hash.Hasher.t -> t -> Node_type.t * bool

Load the snapshot file of Plebeia tree from t.

Sourcemodule Stat : sig ... end

Statistics of the nodes in a snapshot

Sourcemodule Internal : sig ... end
OCaml

Innovation. Community. Security.