Documentation ¶
Overview ¶
Package installinfo offers helpers to interact with the 'install_info' file.
The install_info files is present next to the agent configuration and contains information about how the agent was// installed and its version history. The file is automatically updated by installation tools (MSI installer, Chef, Ansible, DPKG, ...).
Package installinfo offers helpers to interact with the 'install_info' file.
The install_info files is present next to the agent configuration and contains information about how the agent was// installed and its version history. The file is automatically updated by installation tools (MSI installer, Chef, Ansible, DPKG, ...).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFilePath ¶
GetFilePath returns the path of the 'install_info' directory relative to the loaded coinfiguration file. The 'install_info' directory contains information about how the agent was installed.
func LogVersionHistory ¶
func LogVersionHistory()
LogVersionHistory loads version history file, append new entry if agent version is different than the last entry in the JSON file, trim the file if too many entries then save the file.
func RmInstallInfo ¶
func RmInstallInfo()
RmInstallInfo removes the install info and signature files
func WriteInstallInfo ¶
WriteInstallInfo write install info and signature files
Types ¶
type InstallInfo ¶
type InstallInfo struct { Tool string `json:"tool" yaml:"tool"` ToolVersion string `json:"tool_version" yaml:"tool_version"` InstallerVersion string `json:"installer_version" yaml:"installer_version"` }
InstallInfo contains metadata on how the Agent was installed