package tar-format

  1. Overview
  2. Docs

Construct a read-only key-value store from an existing block device containing tar-format data.

Parameters

Signature

include V1_LWT.KV_RO
type error =
  1. | Unknown_key of string
include V1.DEVICE with type error := error with type 'a io = 'a Lwt.t
type 'a io = 'a Lwt.t

The type for potentially blocking I/O operation

type t

The type representing the internal state of the device

type id

This type is no longer used and will be removed once other * modules stop using it in their type signatures.

val disconnect : t -> unit io

Disconnect from the device. While this might take some time to complete, it can never result in an error.

type page_aligned_buffer = Cstruct.t

The type for memory buffers.

val read : t -> string -> int -> int -> [ `Ok of page_aligned_buffer list | `Error of error ] io

read t key offset length reads up to length bytes from the value associated with key. If less data is returned than requested, this indicates the end of the value.

val size : t -> string -> [ `Error of error | `Ok of int64 ] io

Get the value size.

val connect : BLOCK.t -> [> `Ok of t ] Lwt.t
OCaml

Innovation. Community. Security.