Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Identity ¶
type Identity struct {
// contains filtered or unexported fields
}
Identity implements the Provider interface to manage machine identity and group ID.
func (*Identity) CalculateMachineID ¶
func (*Identity) CalculateMachineID(executor utils.CmdExecutor) (string, error)
CalculateMachineID generates a unique machine ID based on system UUID, serial number, and network serials.
func (*Identity) GetGroupID ¶
GetGroupID retrieves the group ID from a file.
type Provider ¶
type Provider interface {
// GetGroupID retrieves the group ID from a file.
GetGroupID() (string, error)
// CalculateMachineID generates a unique machine ID based on system UUID, serial number, and network serials.
CalculateMachineID(executor utils.CmdExecutor) (string, error)
// SaveMachineIDs saves the initial and current machine IDs to their respective files.
SaveMachineIDs(machineIDHash string) (initialMachineID string, err error)
}
Provider defines the interface for managing machine identity and group ID.
func NewIdentity ¶
func NewIdentity() Provider
NewIdentity creates a new Identity instance with default paths for metrics and machine ID.
Click to show internal directories.
Click to hide internal directories.