package octez-l2-libs

  1. Overview
  2. Docs

Same as INDEXED_FILE but where headers are extracted from values.

include INDEXED_FILE
type +'a t

The type of indexed file store.

type key

The type of keys for the store.

type header

The type of headers stored in the index. The header can contain fixed size information that can be accessed more efficiently than the full value.

type value

The type of values stored in the file.

val mem : [> `Read ] t -> key -> bool Tezos_base.TzPervasives.tzresult Lwt.t

Returns true if the key has a value associated in the store.

val header : [> `Read ] t -> key -> header option Tezos_base.TzPervasives.tzresult Lwt.t

Returns the header for a key if it exists in the store.

val read : [> `Read ] t -> key -> (value * header) option Tezos_base.TzPervasives.tzresult Lwt.t

Read a full value and header from the indexed file store.

val load : path:string -> cache_size:int -> 'a Store_sigs.mode -> 'a t Tezos_base.TzPervasives.tzresult Lwt.t

Loads a new or existing indexed file store in the directory path.

Close the index and the file. One must call load again to read or write data in the store.

val readonly : [> `Read ] t -> [ `Read ] t

readonly t returns a read only version of the store t.

val append : ?flush:bool -> [> `Write ] t -> key:key -> value:value -> unit Tezos_base.TzPervasives.tzresult Lwt.t

Append a new binding to the indexed file store.

OCaml

Innovation. Community. Security.