From 14701b9fed59ff5bd006c4ab3a8b5ebfc1eb1af7 Mon Sep 17 00:00:00 2001 From: Max Altgelt Date: Fri, 28 Nov 2025 11:16:00 +0100 Subject: [PATCH] feat: add platform info for AIX --- thorlog/v3/hostinfo.go | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/thorlog/v3/hostinfo.go b/thorlog/v3/hostinfo.go index 8a07370..a2223e2 100644 --- a/thorlog/v3/hostinfo.go +++ b/thorlog/v3/hostinfo.go @@ -168,3 +168,28 @@ func NewWindowsPlatformInfo() *PlatformInfoWindows { }, } } + +type PlatformInfoAIX struct { + jsonlog.ObjectHeader + + // Hardware model + Model string `json:"model" textlog:"model"` + // OS version string, e.g. "7.3" + Version string `json:"version" textlog:"version"` + // Processor type, e.g. "POWER9" + Proc string `json:"proc" textlog:"proc"` +} + +func (PlatformInfoAIX) platform() {} + +const typePlatformInfoAIX = "AIX platform information" + +func init() { AddLogObjectType(typePlatformInfoAIX, &PlatformInfoAIX{}) } + +func NewAIXPlatformInfo() *PlatformInfoAIX { + return &PlatformInfoAIX{ + ObjectHeader: jsonlog.ObjectHeader{ + Type: typePlatformInfoAIX, + }, + } +}