config

package
v0.0.0-...-65751db Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SERVICE_UPDATER_NAME = "UTMStackUpdater"
)

Variables

View Source
var (
	REPLACE_KEY string

	DependUrl        = "https://%s:%s/private/dependencies/agent/%s"
	AgentManagerPort = "443"
	LogAuthProxyPort = "443"
	DependenciesPort = "443"

	ServiceLogFile      = filepath.Join(fs.GetExecutablePath(), "logs", "utmstack_agent.log")
	ModulesServName     = "UTMStackModulesLogsCollector"
	UUIDFileName        = filepath.Join(fs.GetExecutablePath(), "uuid.yml")
	ConfigurationFile   = filepath.Join(fs.GetExecutablePath(), "config.yml")
	RetentionConfigFile = filepath.Join(fs.GetExecutablePath(), "retention.json")
	ConfigStateFile     = filepath.Join(fs.GetExecutablePath(), "config_state.json")
	UpdateHoldFile      = filepath.Join(fs.GetExecutablePath(), "update_hold.json")
	LogsDBFile          = filepath.Join(fs.GetExecutablePath(), "logs_process", "logs.db")
	VersionPath         = filepath.Join(fs.GetExecutablePath(), "version.json")
)
View Source
var (
	ServiceFile = "utmstack_agent_service%s"
	UpdaterFile = "utmstack_updater_service%s"
	DependFiles = []string{"utmstack_agent_dependencies_linux.zip"}
)

Functions

func GenerateNewUUID

func GenerateNewUUID() (string, error)

func GetUUID

func GetUUID() (string, error)

func SaveConfig

func SaveConfig(cnf *Config) error

Types

type Config

type Config struct {
	Server             string `yaml:"server"`
	AgentID            uint   `yaml:"agent-id"`
	AgentKey           string `yaml:"agent-key"`
	SkipCertValidation bool   `yaml:"insecure"`
	NoRemoteControl    bool   `yaml:"no-remote-control"`
	// PauseAutoUpdate freezes the agent at whatever version it's currently
	// running — the updater checks this and skips applying anything the
	// server offers. Deliberately named/framed as "pause", not "pin to
	// version X": the dependencies endpoint always serves the current
	// binary (config.DependUrl has no version segment), so there is no
	// way to fetch a specific historical version to actually pin to. See
	// C4 in GAPS_AND_IMPROVEMENTS.md.
	PauseAutoUpdate bool `yaml:"pause-auto-update"`
}

func GetCurrentConfig

func GetCurrentConfig() (*Config, error)

type DataType

type DataType string

DataType identifies the log source type reported to the engine.

const (
	DataTypeLinuxAgent   DataType = "linux"
	DataTypeWindowsAgent DataType = "wineventlog"
	DataTypeMacOs        DataType = "macos"
)

type InstallationUUID

type InstallationUUID struct {
	UUID string `yaml:"uuid"`
}

Jump to

Keyboard shortcuts

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