Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrTimeout = errors.New("timeout") ErrUnexpected = errors.New("unexpected data") )
Functions ¶
Types ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader reads from a running exec.Cmd.
func FileReader ¶
FileReader returns a CmdReader that reads the current contents of path on pod.file
It returns io.EOF at the end of the file.
func TailReader ¶
TailReader returns a CmdReader that tails file at path on pod.
It uses "tail -F" which will wait for the file to exist if it does not, and will wait for it to be re-created if it is deleted. It will continue to tail until Close() is called.
func TailReaderForContainer ¶
TailReaderForContainer returns a CmdReader that tails file at path on pod.
It uses "tail -F" which will wait for the file to exist if it does not, and will wait for it to be re-created if it is deleted. It will continue to tail until Close() is called.
func (*Reader) Close ¶
Close kills the underlying process, if running. This closes the stdout pipe, so Read or ReadLine will return an error. Returns the error returned by the sub-process.