()
| 113 | } |
| 114 | |
| 115 | func (s *SSHProcessController) StdoutPipe() (io.Reader, error) { |
| 116 | s.lock.Lock() |
| 117 | defer s.lock.Unlock() |
| 118 | if s.started { |
| 119 | return nil, fmt.Errorf("command already started") |
| 120 | } |
| 121 | if s.stdoutPiped { |
| 122 | return nil, fmt.Errorf("stdout already piped") |
| 123 | } |
| 124 | s.stdoutPiped = true |
| 125 | stdout, err := s.session.StdoutPipe() |
| 126 | if err != nil { |
| 127 | return nil, err |
| 128 | } |
| 129 | return stdout, nil |
| 130 | } |
| 131 | |
| 132 | func (s *SSHProcessController) StderrPipe() (io.Reader, error) { |
| 133 | s.lock.Lock() |
nothing calls this directly
no test coverage detected