util

package
v0.41.3 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2017 License: Apache-2.0 Imports: 10 Imported by: 41

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TimeoutDuration = 30 * time.Second

TimeoutDuration is option of `Runcommand()` set timeout limit of command execution.

View Source
var TimeoutKillAfter = 10 * time.Second

TimeoutKillAfter is option of `RunCommand()` set waiting limit to `kill -kill` after terminating the command.

Functions

func RunCommand

func RunCommand(command, user string) (stdout, stderr string, exitCode int, err error)

RunCommand runs command (in two string) and returns stdout, stderr strings and its exit code.

func RunCommandArgs added in v0.41.3

func RunCommandArgs(cmdArgs []string, user string) (stdout, stderr string, exitCode int, err error)

RunCommandArgs run the command

func SanitizeMetricKey added in v0.36.0

func SanitizeMetricKey(key string) string

SanitizeMetricKey sanitize metric keys to be Mackerel friendly

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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