You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
744 B
30 lines
744 B
package golog
|
|
|
|
import (
|
|
"context"
|
|
"go.dtapp.net/gorequest"
|
|
"runtime"
|
|
)
|
|
|
|
func (ag *ApiGorm) setConfig(ctx context.Context, systemOutsideIp string) {
|
|
|
|
info := getSystem()
|
|
|
|
ag.config.systemHostname = info.SystemHostname
|
|
ag.config.systemOs = info.SystemOs
|
|
ag.config.systemVersion = info.SystemVersion
|
|
ag.config.systemKernel = info.SystemKernel
|
|
ag.config.systemKernelVersion = info.SystemKernelVersion
|
|
ag.config.systemBootTime = info.SystemBootTime
|
|
ag.config.cpuCores = info.CpuCores
|
|
ag.config.cpuModelName = info.CpuModelName
|
|
ag.config.cpuMhz = info.CpuMhz
|
|
|
|
ag.config.systemInsideIp = gorequest.GetInsideIp(ctx)
|
|
ag.config.systemOutsideIp = systemOutsideIp
|
|
|
|
ag.config.goVersion = runtime.Version()
|
|
ag.config.sdkVersion = Version
|
|
|
|
}
|