package octez-internal-libs

  1. Overview
  2. Docs
A package that contains some libraries used by the Octez suite

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-octez-v20.1.tag.bz2
sha256=ddfb5076eeb0b32ac21c1eed44e8fc86a6743ef18ab23fff02d36e365bb73d61
sha512=d22a827df5146e0aa274df48bc2150b098177ff7e5eab52c6109e867eb0a1f0ec63e6bfbb0e3645a6c2112de3877c91a17df32ccbff301891ce4ba630c997a65

doc/irmin_pack_unix/Irmin_pack_unix/Sparse_file/Make/Ao/index.html

Module Make.AoSource

Sourcetype t
Sourceval end_off : t -> Optint.Int63.t

end_off t returns the largest virtual offset contained in the sparse file t. Attempting to append with a strictly smaller virtual offset will fail.

Sourceval mapping_size : t -> Optint.Int63.t

end_off t returns the current size of the mapping file associated to the sparse file t including additions not yet flushed to the file system. It can be passed to open_ao as mapping_size when opening the file again.

Sourceval create : mapping:string -> data:string -> (t, [> Io.create_error ]) Stdlib.result

create ~mapping ~data initializes a new empty sparse file, represented on disk by two files named mapping and data.

Sourceval open_ao : mapping_size:Optint.Int63.t -> mapping:string -> data:string -> (t, [> Io.open_error | `Closed | `Invalid_argument | `Read_out_of_bounds | `Inconsistent_store ]) Stdlib.result

open_ao ~mapping_size ~mapping ~data returns an append-only instance of the sparse file.

Sourceval append_seq_exn : t -> off:Optint.Int63.t -> string Irmin.Export_for_backends.Seq.t -> unit

append_seq_exn t ~off seq appends the sequence of strings seq to the sparse file t, at the virtual offset off which must be larger than the previously appended offsets.

Sourceval flush : t -> (unit, [> Io.write_error ]) Stdlib.result

Flush the append buffer. Does not call fsync.

Sourceval close : t -> (unit, [> Io.close_error | `Pending_flush ]) Stdlib.result

Close the underlying files.

OCaml

Innovation. Community. Security.