MCPcopy
hub / github.com/kubernetes/client-go / copyStderr

Method copyStderr

tools/remotecommand/v2.go:152–166  ·  view source on GitHub ↗
(wg *sync.WaitGroup)

Source from the content-addressed store, hash-verified

150}
151
152func (p *streamProtocolV2) copyStderr(wg *sync.WaitGroup) {
153 if p.Stderr == nil || p.Tty {
154 return
155 }
156
157 wg.Add(1)
158 go func() {
159 defer runtime.HandleCrash()
160 defer wg.Done()
161
162 if _, err := io.Copy(p.Stderr, p.remoteStderr); err != nil {
163 runtime.HandleError(err)
164 }
165 }()
166}
167
168func (p *streamProtocolV2) stream(conn streamCreator) error {
169 if err := p.createStreams(conn); err != nil {

Callers 3

streamMethod · 0.95
streamMethod · 0.80
streamMethod · 0.80

Calls 2

AddMethod · 0.65
DoneMethod · 0.65

Tested by

no test coverage detected