Documentation ¶
Overview ¶
Example ¶
package main import ( "context" "fmt" "os/exec" "github.com/suzuki-shunsuke/go-timeout/timeout" ) func main() { cmd := exec.Command("true") runner := timeout.NewRunner(0) ctx, cancel := context.WithCancel(context.Background()) defer cancel() if err := runner.Run(ctx, cmd); err != nil { fmt.Println(err) } }
Output:
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
func (*Runner) SendSignal ¶
func (*Runner) SetSigKillCaballback ¶
type StartError ¶
type StartError struct {
// contains filtered or unexported fields
}
func (StartError) Cause ¶
func (se StartError) Cause() error
func (StartError) Error ¶
func (se StartError) Error() string
func (StartError) Unwrap ¶ added in v1.0.0
func (se StartError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.