common

package
v0.0.0-...-6ac6f58 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0, BSD-3-Clause, MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LocalIPKKey = "BK_DISTCC_LOCAL_IP"
)

Variables

This section is empty.

Functions

func Exist

func Exist(filename string) (bool, error)

Exist check file exist

func GetIPAddress

func GetIPAddress() (addrList []string)

GetIPAddress get local usable inner ip address

func GetLocalIP

func GetLocalIP() (string, error)

get local ip from env first, if not exists or empty, then get from net

func GetTotalCPUUsage

func GetTotalCPUUsage() (float64, error)

between 0 ~ 100

func GetTotalMemory

func GetTotalMemory() (uint64, error)

GetTotalMemory get total memory(KB) for windows

func KillApplicationByNameUnix

func KillApplicationByNameUnix(processName string) error

KillApplicationByNameUnix

func KillApplicationByNameWindows

func KillApplicationByNameWindows(processName string) error

KillApplicationByNameWindows

func ListApplicationByNameAndPidUnix

func ListApplicationByNameAndPidUnix(processName string, pid string) (string, error)

ListApplicationByNameAndPidUnix

func ListApplicationByNameAndPidWindows

func ListApplicationByNameAndPidWindows(processName string, pid string) (string, error)

ListApplicationByNameAndPidWindows

func ListApplicationByNameUnix

func ListApplicationByNameUnix(processName string) (string, error)

ListApplicationByNameUnix

func ListApplicationByNameWindows

func ListApplicationByNameWindows(processName string) (string, error)

ListApplicationByNameWindows

Types

This section is empty.

Jump to

Keyboard shortcuts

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