package docker-api

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

A stream returned by some Docker functions.

type t
type kind =
  1. | Stdout
  2. | Stderr
exception Timeout
val out : t -> out_channel

out stream may be used to send data to the process running in the container. Closing this channel is equivalent to calling close.

val shutdown : t -> unit

shutdown stream transmit an end-of-file condition to the server reading on the other side of the connection meaning that you have finished sending data. You can still read data from the string. You must still close the string with close.

val read : ?timeout:float -> t -> kind * string

read stream reads the next payload from the stream. The byte sequence will be empty if there is nothing to read at the time of the call (in particular, if everything has been read).

  • raises Timeout

    if the payload could not be read within the allowed timeout. A negative timeout (the default) means unbounded wait.

val read_all : t -> (kind * string) list

Read all the available data on the stream.

val close : t -> unit

Close the stream.

OCaml

Innovation. Community. Security.