Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FramedStdCopy ¶
FramedStdCopy is a modified version of stdcopy.StdCopy. FramedStdCopy will demultiplex `src` in the same manner as StdCopy, but instead of using io.Writer for outputs, channels are used, since each frame payload may contain its own inner header (notably, timestamps). Frame payloads are not further parsed here, but are passed raw as individual slices through the output channel.
FramedStdCopy will read until it hits EOF on `src`. It will then return a nil error. In other words: if `err` is non nil, it indicates a real underlying error.
`written` will hold the total number of bytes written to `dstout` and `dsterr`.
func NoHeaderFramedStdCopy ¶
Specialized version of FramedStdCopy for when frames have no headers. This will happen for output from a container that has TTY set. In theory this makes it impossible to find the frame boundaries, which also does not matter if timestamps were not requested, but if they were requested, they will still be there at the start of every frame, which might be mid-line. In practice we can find most boundaries by looking for newlines, since these result in a new frame. Otherwise we rely on using the same max frame size as used in practice by docker.
Types ¶
This section is empty.