mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-04-26 17:23:35 +00:00
It's not very interesting to see the forwarded stdout/stderr messages as they will end-up being printed anyway. Signed-off-by: Thomas Gazagnaire <thomas@gazagnaire.org>
26 lines
934 B
OCaml
26 lines
934 B
OCaml
(** IO helpers *)
|
|
|
|
type t
|
|
(** The type for IO flows *)
|
|
|
|
include Mirage_flow_lwt.S with type flow = t
|
|
|
|
val create: (module Mirage_flow_lwt.S with type flow = 'a) -> 'a -> string -> flow
|
|
(** [create (module M) t name] is the flow representing [t] using the
|
|
function defined in [M]. *)
|
|
|
|
val pp: flow Fmt.t
|
|
(** [pp] is the pretty-printer for IO flows. *)
|
|
|
|
val forward: ?verbose:bool -> src:t -> dst:t -> unit Lwt.t
|
|
(** [forward ?verbose ~src ~dst] forwards writes from [src] to
|
|
[dst]. Block until either [src] or [dst] is closed. If [verbose]
|
|
is set (by default it is not), show the raw flow in debug mode,
|
|
otherwise just show the lenght. *)
|
|
|
|
val proxy: ?verbose:bool -> t -> t -> unit Lwt.t
|
|
(** [proxy ?verbose x y] is the same as [forward x y <*> forward y
|
|
x]. Block until both flows are closed. If [verbose] is set (by
|
|
default it is not), show the raw flow in debug mode, otherwise
|
|
just show the lenght. *)
|