utilsApp

package
v0.0.0-...-7ec6a99 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppInfo

type AppInfo struct {
	Name      AppName               `json:"name"`
	RunID     string                `json:"run_id"`
	ServerIP  string                `json:"server_ip"`
	ServerMAC string                `json:"server_mac"`
	System    *utilsEnv.System      `json:"system"`
	Version   *utilsVersion.Version `json:"version"`
	Runtime   *ProcessRuntime       `json:"runtime"`
}

func NewAppInfo

func NewAppInfo() *AppInfo

func (*AppInfo) SetCpuArch

func (a *AppInfo) SetCpuArch(cpu string) *AppInfo

func (*AppInfo) SetIP

func (a *AppInfo) SetIP(ip string) *AppInfo

func (*AppInfo) SetIpWithFirstAvaliable

func (a *AppInfo) SetIpWithFirstAvaliable(exclude []string) *AppInfo

func (*AppInfo) SetIpWithNic

func (a *AppInfo) SetIpWithNic(ethName string) *AppInfo

func (*AppInfo) SetMAC

func (a *AppInfo) SetMAC(mac string) *AppInfo

func (*AppInfo) SetName

func (a *AppInfo) SetName(sname, aname, mname string) *AppInfo

func (*AppInfo) SetRunID

func (a *AppInfo) SetRunID(runid string) *AppInfo

func (*AppInfo) SetSystem

func (a *AppInfo) SetSystem(i *utilsEnv.System) *AppInfo

func (*AppInfo) SetVersion

func (a *AppInfo) SetVersion(v *utilsVersion.Version) *AppInfo

type AppName

type AppName struct {
	Sysname    string `json:"sysname"`
	Appname    string `json:"appname"`
	Modulename string `json:"modulename"`
}

func (*AppName) Full

func (n *AppName) Full() string

type ProcessRuntime

type ProcessRuntime struct {
	PID  int      `json:"pid"`
	UID  int      `json:"uid"`
	GID  int      `json:"gid"`
	WD   string   `json:"wd"`
	Envs []string `json:"envs"`
}

func GetRuntime

func GetRuntime() *ProcessRuntime

Jump to

Keyboard shortcuts

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