MCPcopy Create free account
hub / github.com/docker/buildx / ForwardIO

Method ForwardIO

monitor/processes/processes.go:26–32  ·  view source on GitHub ↗

ForwardIO forwards process's io to the specified reader/writer. Optionally specify ioCancelCallback which will be called when the process closes the specified IO. This will be useful for additional cleanup.

(in *ioset.In, ioCancelCallback func(error))

Source from the content-addressed store, hash-verified

24// Optionally specify ioCancelCallback which will be called when
25// the process closes the specified IO. This will be useful for additional cleanup.
26func (p *Process) ForwardIO(in *ioset.In, ioCancelCallback func(error)) {
27 p.inEnd.SetIn(in)
28 if f := p.serveIOCancel; f != nil {
29 f(errors.WithStack(context.Canceled))
30 }
31 p.serveIOCancel = ioCancelCallback
32}
33
34// Done returns a channel where error or nil will be sent
35// when the process exits.

Callers 1

InvokeMethod · 0.80

Calls 1

SetInMethod · 0.80

Tested by

no test coverage detected