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.
golog/api_gorm_config.go

30 lines
744 B

5 months ago
package golog
import (
"context"
5 months ago
"go.dtapp.net/gorequest"
5 months ago
"runtime"
)
5 months ago
func (ag *ApiGorm) setConfig(ctx context.Context, systemOutsideIp string) {
5 months ago
info := getSystem()
5 months ago
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
5 months ago
5 months ago
ag.config.systemInsideIp = gorequest.GetInsideIp(ctx)
ag.config.systemOutsideIp = systemOutsideIp
5 months ago
5 months ago
ag.config.goVersion = runtime.Version()
ag.config.sdkVersion = Version
5 months ago
}