Documentation
¶
Overview ¶
errors.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrUnsupported = errors.New("machineid: unsupported platform")
ErrUnsupported indicates the current platform is not supported by the SMBIOS/installation ID backends.
Functions ¶
func ID ¶
ID returns a hashed identifier for the current machine. It combines the operating system name, SMBIOS hardware UUID, and an operating system installation identifier when available. The identifier is stable for a given machine yet changes when the VM or host is cloned.
func RawID ¶
RawID returns the unprocessed SMBIOS UUID and installation ID used to build the hashed identifier. It is primarily useful for diagnostics.
func SetLogLevel ¶
func SetLogLevel(level LogLevel)
SetLogLevel configures the global log level for the machineid package. By default, logging is set to Error level to avoid noise in production.
func SetLogLevelFromEnv ¶
func SetLogLevelFromEnv()
SetLogLevelFromEnv configures the log level from the MACHINEID_LOG_LEVEL environment variable. Valid values are: "error", "info", "debug" (case insensitive). If the environment variable is not set or invalid, defaults to Error level.