I'm writing a utility to execute commands on remote servers with the crypto/ssh package. I'm currently reading from the session.stdoutpipe() io.Reader in to a bytes.Buffer which I can format and print out after the session is complete.
The documentation states:
StdoutPipe func() (io.Reader, error) StdoutPipe returns a pipe that will be connected to the remote command's standard output when the command starts. There is a fixed amount of buffering that is shared between stdout and stderr streams. If the StdoutPipe reader is not serviced fast enough it may eventually cause the remote command to block.
I haven't had any issues so far with my testing, but it got me curious to know what is the fixed amount. I've successfully streamed text up to 6.5mb without reading the pipe Reader until the command has finished.
Does anyone know what the fixed amount is, or when the command will start to block? I can't find it in the source.