package qcow

  1. Overview
  2. Docs
type t

A cache of clusters

val create : read_cluster: (Qcow_types.Cluster.t -> (Cstruct.t, Mirage_block.error) Stdlib.result Lwt.t) -> write_cluster: (Qcow_types.Cluster.t -> Cstruct.t -> (unit, Mirage_block.write_error) Stdlib.result Lwt.t) -> unit -> t

Create a cache of clusters, given the read/write functions

val read : t -> Qcow_types.Cluster.t -> (Cstruct.t, Mirage_block.error) Stdlib.result Lwt.t

read t cluster returns the data in cluster

val write : t -> Qcow_types.Cluster.t -> Cstruct.t -> (unit, Mirage_block.write_error) Stdlib.result Lwt.t

write t cluster data writes data to cluster

val remove : t -> Qcow_types.Cluster.t -> unit

remove t cluster drops any cache associated with cluster

val resize : t -> Qcow_types.Cluster.t -> unit

resize t new_size_clusters drops any cache entries which are beyond the new file size.

module Debug : sig ... end
OCaml

Innovation. Community. Security.