package irmin-pack
- Overview
- No Docs
You can search for identifiers within the package.
in-package search v0.2.0
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=6aa5ba4c6a0233747d4bd3ab396f2b3a33bb80f9d8ed4a178c83a035033c0e52
sha512=8a5506a57e8569a11c883ca25b3c60ae7a9a03c2da111668193d7b4296434c43f1a310e78f189e4b38c234da790259d2961c6a0ae481282c18bb97f618fccfb6
doc/irmin-pack.unix/Irmin_pack_unix/Inode/Make_persistent/argument-4-Pack/index.html
Parameter Make_persistent.Pack
include Irmin_pack.Indexable.S
with type hash = H.t
with type key = H.t Pack_key.t
with type value = Inter.Raw.t
include Irmin.Indexable.S
with type hash = H.t
with type key = H.t Pack_key.t
with type value = Inter.Raw.t
Read-only stores
Read-only stores are store where it is only possible to read existing values.
type key = H.t Pack_key.tThe type for keys.
type value = Inter.Raw.tThe type for raw values.
val mem : [> Irmin.Perms.read ] t -> key -> bool Lwt.tmem t k is true iff k is present in t.
val find : [> Irmin.Perms.read ] t -> key -> value option Lwt.tfind t k is Some v if k is associated to v in t and None is k is not present in t.
close t frees up all the resources associated with t. Any operations run on a closed handle will raise Closed.
type hash = H.tThe type of hashes of value.
val index : [> Irmin.Perms.read ] t -> hash -> key option Lwt.tIndexing maps the hash of a value to a corresponding key of that value in the store. For stores that are addressed by hashes directly, this is typically fun _t h -> Lwt.return (Key.of_hash h); for stores with more complex addressing schemes, index may attempt a lookup operation in the store.
In general, indexing is best-effort and reveals no information about the membership of the value in the store. In particular:
index t hash = Some keydoesn't guaranteemem t key: the value with hashhashmay still be absent from the store;
index t hash = Nonedoesn't guarantee that there is nokeysuch thatmem t keyandKey.to_hash key = hash: the value may still be present in the store under a key that is not indexed.
val batch :
Irmin.Perms.read t ->
([ Irmin.Perms.read | Irmin.Perms.write ] t -> 'a Lwt.t) ->
'a Lwt.tbatch t f applies the writes in f in a separate batch. The exact guarantees depend on the implementation.
Overwrite unsafe_add to work with a read-only database handler.
val v :
config:Irmin.Backend.Conf.t ->
fm:file_manager ->
dict:dict ->
dispatcher:dispatcher ->
Irmin.Perms.read tval cast : Irmin.Perms.read t -> Irmin.Perms.read_write tval integrity_check :
offset:Optint.Int63.t ->
length:int ->
hash ->
_ t ->
(unit, [ `Wrong_hash | `Absent_value ]) resultmodule Entry_prefix : sig ... endval read_and_decode_entry_prefix :
off:Optint.Int63.t ->
dispatcher ->
Entry_prefix.tRead the entry prefix at offset off.
val index_direct_with_kind :
'a t ->
hash ->
(key * Irmin_pack.Pack_value.Kind.t) optionReturns the key and the kind of an object indexed by hash.
val purge_lru : 'a t -> unitval key_of_offset : 'a t -> Optint.Int63.t -> keyReturns the key associated with the offset.
Similar to unsafe_find, returns the value associated with the key in the store but without prefetching the hash and length of the children (or doing any integrity check). As a result, the produced children keys only contain their offset and are not usable without calling key_of_offset first. This function only exists to optimize the GC reachability traversal.
val get_offset : 'a t -> key -> Optint.Int63.tReturns the offset associated with the key.