Documentation ¶
Index ¶
- Variables
- func FloatToIntRoundUP(f float64) int
- func GetEnv(key string, dfault string, combineWith ...string) string
- func HostProc(combineWith ...string) string
- func RoundToTwoDecimalPlaces(v float64) float64
- func RunCommandWithTimeout(timeout time.Duration, name string, arg ...string) ([]byte, error)
- func StrInSlice(search string, slice []string) bool
- type MeasurementsMap
- type Timestamp
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCommandExecutionTimeout = errors.New("command execution timeout exceeded")
Functions ¶
func FloatToIntRoundUP ¶
func GetEnv ¶
GetEnv retrieves the environment variable key. If it does not exist it returns the default.
func RoundToTwoDecimalPlaces ¶
func RunCommandWithTimeout ¶
RunCommandWithTimeout runs command and returns it's standard output. If timeout exceeded the returned error is ErrCommandExecutionTimeout
func StrInSlice ¶
StrInSlice returns true if search string found in slice
Types ¶
type MeasurementsMap ¶
type MeasurementsMap map[string]interface{}
func (MeasurementsMap) AddInnerWithPrefix ¶
func (mm MeasurementsMap) AddInnerWithPrefix(prefix string, m MeasurementsMap) MeasurementsMap
func (MeasurementsMap) AddWithPrefix ¶
func (mm MeasurementsMap) AddWithPrefix(prefix string, m MeasurementsMap) MeasurementsMap
func (MeasurementsMap) ToJSON ¶
func (mm MeasurementsMap) ToJSON() string
Click to show internal directories.
Click to hide internal directories.