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

Method copyStdout

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

Source from the content-addressed store, hash-verified

134}
135
136func (p *streamProtocolV2) copyStdout(wg *sync.WaitGroup) {
137 if p.Stdout == nil {
138 return
139 }
140
141 wg.Add(1)
142 go func() {
143 defer runtime.HandleCrash()
144 defer wg.Done()
145
146 if _, err := io.Copy(p.Stdout, p.remoteStdout); err != nil {
147 runtime.HandleError(err)
148 }
149 }()
150}
151
152func (p *streamProtocolV2) copyStderr(wg *sync.WaitGroup) {
153 if p.Stderr == nil || p.Tty {

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