MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / WithTimeout

Method WithTimeout

internal/utils/exec/cmd.go:47–55  ·  view source on GitHub ↗
(timeout time.Duration)

Source from the content-addressed store, hash-verified

45}
46
47func (this *Cmd) WithTimeout(timeout time.Duration) *Cmd {
48 this.timeout = timeout
49
50 ctx, cancelFunc := context.WithTimeout(context.Background(), timeout)
51 this.ctx = ctx
52 this.cancelFunc = cancelFunc
53
54 return this
55}
56
57func (this *Cmd) WithStdout() *Cmd {
58 this.captureStdout = true

Callers 3

InstallMethod · 0.95
NewTimeoutCmdFunction · 0.80
TestEndpointsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected