util

package
v0.31.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2016 License: Apache-2.0 Imports: 11 Imported by: 0

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 CollectDfValues added in v0.16.1

func CollectDfValues(dfColumnSpecs []DfColumnSpec) (map[string]map[string]interface{}, error)

CollectDfValues XXX

func Periodically added in v0.16.0

func Periodically(proc func(), interval time.Duration, cancel <-chan struct{})

Periodically invokes function proc with specified interval. The precision is 1/100 of the interval.

func RunCommand

func RunCommand(command string) (string, string, int, error)

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

Types

type DfColumnSpec added in v0.16.1

type DfColumnSpec struct {
	Name  string
	IsInt bool // type of collected data  true: int64, false: string
}

DfColumnSpec XXX

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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