irmin-pack

Irmin backend which stores values in a pack file
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library irmin-pack.unix
Module Irmin_pack_unix . KV . Maker . Make . Tree
val path_t : path Irmin.Type.t
val step_t : step Irmin.Type.t
val metadata_t : metadata Irmin.Type.t
val contents_t : contents Irmin.Type.t
val contents_key_t : contents_key Irmin.Type.t
val node_t : node Irmin.Type.t
val hash_t : hash Irmin.Type.t
val empty : unit -> tree
val singleton : path -> ?metadata:metadata -> contents -> tree
val of_contents : ?metadata:metadata -> contents -> tree
val of_node : node -> tree
type elt = [
| `Contents of contents * metadata
| `Node of node
]
val v : elt -> tree
val kinded_hash_t : [ `Contents of hash * metadata | `Node of hash ] Irmin.Type.t
val pruned : [ `Contents of hash * metadata | `Node of hash ] -> tree
val kind : tree -> path -> [ `Contents | `Node ] option Lwt.t
val is_empty : tree -> bool
val diff : tree -> tree -> (path * (contents * metadata) Irmin.Diff.t) list Lwt.t
exception Dangling_hash of {
context : string;
hash : hash;
}
exception Pruned_hash of {
context : string;
hash : hash;
}
exception Portable_value of {
context : string;
}
type error = [
| `Dangling_hash of hash
| `Portable_value
| `Pruned_hash of hash
]
type !'a or_error = ( 'a, error ) result
module Contents : sig ... end
val mem : tree -> path -> bool Lwt.t
val find_all : tree -> path -> (contents * metadata) option Lwt.t
val length : tree -> ?cache:bool -> path -> int Lwt.t
val find : tree -> path -> contents option Lwt.t
val get_all : tree -> path -> (contents * metadata) Lwt.t
val list : tree -> ?offset:int -> ?length:int -> ?cache:bool -> path -> (step * tree) list Lwt.t
val get : tree -> path -> contents Lwt.t
val add : tree -> path -> ?metadata:metadata -> contents -> tree Lwt.t
val update : tree -> path -> ?metadata:metadata -> ( contents option -> contents option ) -> tree Lwt.t
val remove : tree -> path -> tree Lwt.t
val mem_tree : tree -> path -> bool Lwt.t
val find_tree : tree -> path -> tree option Lwt.t
val get_tree : tree -> path -> tree Lwt.t
val add_tree : tree -> path -> tree -> tree Lwt.t
val update_tree : tree -> path -> ( tree option -> tree option ) -> tree Lwt.t
val merge : tree Irmin.Merge.t
val destruct : tree -> [ `Contents of Contents.t * metadata | `Node of node ]
val empty_marks : unit -> marks
type !'a force = [
| `False of path -> 'a -> 'a Lwt.t
| `True
]
type uniq = [
| `False
| `Marks of marks
| `True
]
type !'a node_fn = path -> step list -> 'a -> 'a Lwt.t
type depth = [
| `Eq of int
| `Ge of int
| `Gt of int
| `Le of int
| `Lt of int
]
val depth_t : depth Irmin.Type.t
val fold : ?order:[ `Random of Random.State.t | `Sorted | `Undefined ] -> ?force:'a force -> ?cache:bool -> ?uniq:uniq -> ?pre:'a node_fn -> ?post:'a node_fn -> ?depth:depth -> ?contents:( path -> contents -> 'a -> 'a Lwt.t ) -> ?node:( path -> node -> 'a -> 'a Lwt.t ) -> ?tree:( path -> tree -> 'a -> 'a Lwt.t ) -> tree -> 'a -> 'a Lwt.t
type stats = Irmin.Of_backend(X).Tree.stats = {
nodes : int;
leafs : int;
skips : int;
depth : int;
width : int;
}
val stats_t : stats Irmin.Type.t
val stats : ?force:bool -> tree -> stats Lwt.t
type concrete = [
| `Contents of contents * metadata
| `Tree of (step * concrete) list
]
val concrete_t : concrete Irmin.Type.t
val of_concrete : concrete -> tree
val to_concrete : tree -> concrete Lwt.t
module Proof : sig ... end
val clear : ?depth:int -> tree -> unit
type counters = Irmin.Of_backend(X).Tree.counters = {
mutable contents_hash : int;
mutable contents_find : int;
mutable contents_add : int;
mutable contents_mem : int;
mutable node_hash : int;
mutable node_mem : int;
mutable node_index : int;
mutable node_add : int;
mutable node_find : int;
mutable node_val_v : int;
mutable node_val_find : int;
mutable node_val_list : int;
}
val counters : unit -> counters
val dump_counters : unit Fmt.t
val reset_counters : unit -> unit
val inspect : tree -> [ `Contents | `Node of [ `Key | `Map | `Portable_dirty | `Pruned | `Value ] ]
module Private : sig ... end
type kinded_key = [
| `Contents of contents_key * metadata
| `Node of node_key
]
val kinded_key_t : kinded_key Irmin.Type.t
val key : tree -> kinded_key option
val find_key : Repo.t -> tree -> kinded_key option Lwt.t
val of_key : Repo.t -> kinded_key -> tree option Lwt.t
val shallow : Repo.t -> kinded_key -> tree
val hash : ?cache:bool -> tree -> hash
type kinded_hash = [
| `Contents of hash * metadata
| `Node of hash
]
val kinded_hash : ?cache:bool -> tree -> kinded_hash
val of_hash : Repo.t -> kinded_hash -> tree option Lwt.t
type verifier_error = [
| `Proof_mismatch of string
| `Stream_too_long of string
| `Stream_too_short of string
]
val verifier_error_t : verifier_error Irmin.Type.t
val produce_proof : repo -> kinded_key -> ( tree -> (tree * 'a) Lwt.t ) -> (Proof.tree Proof.t * 'a) Lwt.t
val verify_proof : Proof.tree Proof.t -> ( tree -> (tree * 'a) Lwt.t ) -> ( tree * 'a, verifier_error ) result Lwt.t
val produce_stream : repo -> kinded_key -> ( tree -> (tree * 'a) Lwt.t ) -> (Proof.stream Proof.t * 'a) Lwt.t
val verify_stream : Proof.stream Proof.t -> ( tree -> (tree * 'a) Lwt.t ) -> ( tree * 'a, verifier_error ) result Lwt.t