package mirage

  1. Overview
  2. Docs
type id = string
type blkif = < destroy : unit ; id : string ; ppname : string ; read_512 : int64 -> int64 -> Cstruct.t Lwt_stream.t ; readwrite : bool ; sector_size : int ; size : int64 ; write_page : int64 -> Io_page.t -> unit Lwt.t >
type kv_ro = < iter_s : (string -> unit Lwt.t) -> unit Lwt.t ; read : string -> Cstruct.t Lwt_stream.t option Lwt.t ; size : string -> int64 option Lwt.t >
type plug = {
  1. p_id : string;
  2. p_dep_ids : string list;
  3. p_cfg : (string * string) list;
}
type entry = {
  1. provider : provider;
  2. id : string;
  3. depends : entry list;
  4. node : device;
}
and device =
  1. | Blkif of blkif
  2. | KV_RO of kv_ro
and provider = < create : deps:entry list -> cfg:(string * string) list -> id -> entry Lwt.t ; id : string ; plug : plug Lwt_mvar.t ; unplug : id Lwt_mvar.t >
val new_provider : provider -> unit
val find : id -> entry Lwt.t
val find_blkif : id -> blkif option Lwt.t
val find_kv_ro : id -> kv_ro option Lwt.t
val with_blkif : id -> (blkif -> 'a Lwt.t) -> 'a Lwt.t
val with_kv_ro : id -> (kv_ro -> 'a Lwt.t) -> 'a Lwt.t
val listen : (id -> unit Lwt.t) -> unit Lwt.t
OCaml

Innovation. Community. Security.