Documentation
¶
Index ¶
Constants ¶
const ( // Dependency versions - single source of truth UpdaterVersion = "11.2.3" BeatsVersion = "11.2.3" MacosCollectorVersion = "11.2.3" )
const AuditdVersion = "1.0.0"
AuditdVersion is the UTMStack audit rules version. Bump this when audit rules are updated to trigger rule redeployment.
Variables ¶
This section is empty.
Functions ¶
func Reconcile ¶
Reconcile ensures all dependencies are installed and up-to-date. This should be called at agent startup, before starting collectors.
func UninstallAll ¶
func UninstallAll() error
UninstallAll calls the Uninstall hook for all dependencies that have one. This should be called during agent uninstall to clean up dependency artifacts.
func UpdaterFile ¶
UpdaterFile returns the updater binary name with OS and architecture suffix. Format: utmstack_updater_service_<os>_<arch>[.exe] Examples:
- utmstack_updater_service_linux_amd64
- utmstack_updater_service_windows_amd64.exe
- utmstack_updater_service_darwin_arm64
Types ¶
type Dependency ¶
type Dependency struct {
Name string // Unique identifier
Version string // Current version in this agent build
BinaryPath string // Path to check if already exists
DownloadURL func(server string) string // URL template to download from
DownloadName string // Filename to save as (if different from BinaryPath basename)
Critical bool // If true, failure blocks agent startup
PreDownload func() (cleanup func(), err error) // Called before download, returns cleanup for rollback
PostDownload func() error // Run after download (e.g., unzip). Can be nil.
Configure func() error // Run on first install (can be nil)
Update func() error // Run on version change (can be nil, uses Configure)
Uninstall func() error // Run when dependency is removed (can be nil)
}
Dependency represents a dependency that the agent needs.
func GetDependencies ¶
func GetDependencies() []Dependency
GetDependencies returns the list of dependencies for Linux amd64.
func (*Dependency) Exists ¶
func (d *Dependency) Exists() bool
Exists checks if the dependency binary exists on disk.
type DistroInfo ¶
type DistroInfo struct {
ID string // Primary distro ID (debian, ubuntu, rhel, centos, fedora, etc.)
IDLike string // Parent distro family (debian, rhel, etc.)
PackageManager string // Package manager to use (apt, dnf, yum, zypper, pacman)
}
DistroInfo holds Linux distribution details for package manager selection.
func DetectDistro ¶
func DetectDistro() *DistroInfo
DetectDistro parses /etc/os-release and determines the package manager to use. Falls back to binary detection if os-release parsing fails.
type InstalledDep ¶
InstalledDep represents a dependency that has been installed and tracked.
type InstalledDeps ¶
type InstalledDeps struct {
Dependencies []InstalledDep `json:"dependencies"`
}
InstalledDeps is the list of installed dependencies (persisted to JSON).
func (*InstalledDeps) Add ¶
func (i *InstalledDeps) Add(name, version string)
func (*InstalledDeps) Get ¶
func (i *InstalledDeps) Get(name string) *InstalledDep
func (*InstalledDeps) Has ¶
func (i *InstalledDeps) Has(name string) bool
func (*InstalledDeps) Remove ¶
func (i *InstalledDeps) Remove(name string)
func (*InstalledDeps) Update ¶
func (i *InstalledDeps) Update(name, version string)