runtimeKit

package
v2.1.36 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package runtimeKit 主要是对如下包的封装:"runtime"

Index

Constants

This section is empty.

Variables

View Source
var GetHostInfo func() (*host.InfoStat, error) = host.Info
View Source
var GoRoot string

GoRoot GOROOT环境变量

View Source
var GoVersion string

GoVersion Golang的版本号

View Source
var PID int = os.Getpid()

PID 当前进程的id.

Functions

func GetDockerIdList

func GetDockerIdList() ([]string, error)

GetDockerIdList

通过第三方库 gopsutil 实现.

func GetMacAddresses

func GetMacAddresses() ([]string, error)

GetMacAddresses *

func PidExists

func PidExists(pid int32) (bool, error)

PidExists 判断 传参pid 对应的进程是否存在

PS: 通过 第三方库gopsutil 实现.

e.g. (-1) => (false, error(invalid pid -1)) (13120) => (true, nil) (13121) => (false, nil)

Types

This section is empty.

Jump to

Keyboard shortcuts

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