exec

package
v0.0.0-...-8680cc4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Retry

func Retry(times int, interval time.Duration, f func() error) error

Retry will run function with times, if err is nil, it will return nil, if over times, it will return last error.

func Run

func Run(timeout time.Duration, bin string, args ...string) (int, string, string, error)

Run returns running command result with timeout, returns are command exit code, stdout iostream, stderr iostream, error.

func RunWithRetry

func RunWithRetry(times int, interval, timeout time.Duration, bin string, args ...string) (int, string, string, error)

RunWithRetry returns running command with "times" retries, must keep exit is 0 when execute success, returns are command exit code, stdout iostream, stderr iostream, error.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL