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.
29 lines
720 B
29 lines
720 B
2 years ago
|
package golog
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"github.com/dtapps/go-library"
|
||
|
"github.com/dtapps/go-library/utils/goip"
|
||
|
"runtime"
|
||
|
)
|
||
|
|
||
|
func (c *ApiClient) setConfig(ctx context.Context) {
|
||
|
|
||
|
info := getSystem()
|
||
|
|
||
|
c.config.systemHostname = info.SystemHostname
|
||
|
c.config.systemOs = info.SystemOs
|
||
|
c.config.systemVersion = info.SystemVersion
|
||
|
c.config.systemKernel = info.SystemKernel
|
||
|
c.config.systemKernelVersion = info.SystemKernelVersion
|
||
|
c.config.systemBootTime = info.SystemBootTime
|
||
|
c.config.cpuCores = info.CpuCores
|
||
|
c.config.cpuModelName = info.CpuModelName
|
||
|
c.config.cpuMhz = info.CpuMhz
|
||
|
|
||
|
c.config.systemInsideIp = goip.GetInsideIp(ctx)
|
||
|
|
||
|
c.config.sdkVersion = go_library.Version()
|
||
|
c.config.goVersion = runtime.Version()
|
||
|
}
|