installinfo

package
v0.0.0-...-afcb601 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

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

func GetFilePath(conf model.Reader) string

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

func WriteInstallInfo(installerVersion, installType string) error

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

func Get

func Get(conf model.Reader) (*InstallInfo, error)

Get returns information about how the Agent was installed.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL