helpers

package
v0.0.0-...-0a70696 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2016 License: Apache-2.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AgentVersion string = "UNSET"

AgentVersion defines the build of the agent along with a short git hash of the point in the repo when the agent as built

Functions

func GetDMIValue

func GetDMIValue(header string) (string, error)

GetDMIValue reads a DMI header value from a Linux Kernel pseudo file

func GetInitrdVersion

func GetInitrdVersion() (string, error)

GetInitrdVersion reads a file from the system that contains the version of the Rebuild Initrd this agent is running from

func GetKernelVersion

func GetKernelVersion() (string, error)

GetKernelVersion queries uname and returns the "Release" field as a string

func HandleError

func HandleError(logger *logrus.Logger, state string, err error)

HandleError provides a simple function to check if a error is empty and if not to log the error and the current state when checking the error. This function is purely to save space in code.

func StringToInt32

func StringToInt32(value string) int32

stringToInt32 converts a string into a 32bit integer

func StringToInt64

func StringToInt64(value string) int64

stringToInt64 converts a string into a 64bit integer

Types

This section is empty.

Jump to

Keyboard shortcuts

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