Cancel cancels the stream by sending a termination signal to the target.
()
| 83 | |
| 84 | // Cancel cancels the stream by sending a termination signal to the target. |
| 85 | func (p *ProcessStream) Cancel() errors.Error { |
| 86 | err := errors.Convert(p.process.Signal(syscall.SIGTERM)) |
| 87 | if err != nil { |
| 88 | return err |
| 89 | } |
| 90 | p.cancelled = true |
| 91 | return nil |
| 92 | } |
| 93 | |
| 94 | func (resp *ProcessResponse) GetStdout() []byte { |
| 95 | return resp.stdout |