Documentation
¶
Index ¶
- func FormatStdOut(stdout []byte, userfulIndex int) []string
- func GetDiskSpace() int64
- func GetNetworkInterfaceName() (string, error)
- func GetPrivateIPs() ([]net.IP, error)
- func GetPublicIP() (net.IP, error)
- func GetSystemInfo() common.AgentSystemInfo
- func GetSystemMemory() (int64, int64)
- func RecordPackets(w io.WriteCloser, stop chan bool) error
- func SetSystemTime(newTime time.Time) error
- type Agent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatStdOut ¶
func GetDiskSpace ¶
func GetDiskSpace() int64
GetDiskSpace uses df -k with the DataDir as parameter to return the amount of diskspace available for that folder
func GetNetworkInterfaceName ¶
func GetPrivateIPs ¶
GetPrivateIPs reads the information of the network interfaces to return the private IP addresses
func GetPublicIP ¶
GetPublicIP uses an external site to retrieve the agent's public IP address
func GetSystemInfo ¶
func GetSystemInfo() common.AgentSystemInfo
GetSystemInfo composes a copy of the common.AgentSystemInfo struct base on the current system information
func GetSystemMemory ¶
GetSystemMemory reads from /proc/meminfo how much memory is available to the process
func RecordPackets ¶
func RecordPackets(w io.WriteCloser, stop chan bool) error
func SetSystemTime ¶
SetSystemTime uses the system's date binary to set the current system time to the given newTime
Types ¶
type Agent ¶
type Agent struct {
// contains filtered or unexported fields
}
Agent is the main class for the agent binary
Source Files
¶
Click to show internal directories.
Click to hide internal directories.