package docker-api

  1. Overview
  2. Docs
Binding to the Docker Remote API

Install

Dune Dependency

Authors

Maintainers

Sources

docker-api-0.1.tar.gz
sha256=7c759b3d0f237df09e0d2be0e0f1c0586bb840f702353236ce18f8b99c85ed75
md5=6745c33bddc7437d8bd725b91e783b93

doc/docker/Docker/Stream/index.html

Module Docker.Stream

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.