MCPcopy Index your code
hub / github.com/PatchMon/PatchMon / GetArchitecture

Method GetArchitecture

agent-source-code/internal/system/system.go:258–269  ·  view source on GitHub ↗

GetArchitecture returns the system architecture

()

Source from the content-addressed store, hash-verified

256
257// GetArchitecture returns the system architecture
258func (d *Detector) GetArchitecture() string {
259 ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
260 defer cancel()
261
262 info, err := host.InfoWithContext(ctx)
263 if err != nil {
264 d.logger.WithError(err).Warn("Failed to get architecture")
265 return constants.ArchUnknown
266 }
267
268 return info.KernelArch
269}
270
271// GetHostname returns the system hostname
272func (d *Detector) GetHostname() (string, error) {

Callers 1

sendReportFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected