{"modulePath":"github.com/utmstack/UTMStack/installer","version":"v0.0.0-20261203180808-4d12b9be42b1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package config\n\n## Constants\n\n```go\nconst (\n\tRegisterInstanceEndpoint      = \"/api/v1/instances/register\"\n\tGetInstanceDetailsEndpoint    = \"/api/v1/instances\"\n\tUpdateInstanceDetailsEndpoint = \"/api/v1/instances/details\"\n\tHeartbeatEndpoint             = \"/api/v1/instances/heartbeat\"\n\tGetUpdatesInfoEndpoint        = \"/api/v1/updates\"\n\tSetUpdateSentEndpoint         = \"/api/v1/updates/sent\"\n\tGetLicenseEndpoint            = \"/api/v1/licenses\"\n\tHealthEndpoint                = \"/api/v1/health\"\n\tUsageReportEndpoint           = \"/api/v1/usage\"\n\n\tGitHubReleasesURL = \"https://github.com/utmstack/UTMStack/releases/download/%s/installer\"\n\n\tImagesPath         = \"/utmstack/images\"\n\tInstallerBinPath   = \"/usr/local/bin/utmstack_installer\"\n\tInstallerAliasPath = \"/usr/local/bin/utmstack\"\n\n\tRequiredMinCPUCores  = 2\n\tRequiredMinDiskSpace = 30\n\tRequiredDistroUbuntu = \"ubuntu\"\n\tRequiredDistroDebian = \"debian\"\n\tRequiredDistroRHEL   = \"redhat\"\n)\n```\n\n## Variables\n\n```go\nvar (\n\tDEFAULT_BRANCH    string\n\tINSTALLER_VERSION string\n\tREPLACE           string\n\tPUBLIC_KEY        string\n\n\tConfigPath             = filepath.Join(\"/root\", \"utmstack.yml\")\n\tInstanceConfigPath     = filepath.Join(GetConfig().UpdatesFolder, \"instance-config.yml\")\n\tServiceLogPath         = filepath.Join(GetConfig().UpdatesFolder, \"logs\", \"utmstack-updater.log\")\n\tVersionFilePath        = filepath.Join(GetConfig().UpdatesFolder, \"version.json\")\n\tOldVersionFilePath     = filepath.Join(GetConfig().UpdatesFolder, \"version-old.json\")\n\tLicenseFilePath        = filepath.Join(GetConfig().UpdatesFolder, \"LICENSE\")\n\tPendingUpdatesPath     = filepath.Join(GetConfig().UpdatesFolder, \"pending-updates.json\")\n\tMemoryAllocationPath   = filepath.Join(GetConfig().UpdatesFolder, \"memory-allocation.json\")\n\tLastAdminEmailPath     = filepath.Join(GetConfig().UpdatesFolder, \"last-admin-email.txt\")\n\tEventProcessorLogsPath = filepath.Join(GetConfig().DataDir, \"events-engine-workdir\", \"logs\")\n\tCheckUpdatesEvery      = 5 * time.Minute\n\tConnectedToInternet    = false\n)\n```\n\n## Functions\n\n```go\nfunc DetectAirGapMode() bool\n```\n\n```go\nfunc GetCMServer() string\n```\n\n```go\nfunc GetProductSlug() string\n```\n\n```go\nfunc Logger() *twlogger.Logger\n```\n\n## Types\n\n```go\ntype Config struct {\n\tMainServer            string  `yaml:\"main_server\"`\n\tBranch                string  `yaml:\"branch\"`\n\tPassword              string  `yaml:\"password\"`\n\tOpenSearchPassword    string  `yaml:\"opensearch_password\"`\n\tOpenSearchServiceName string  `yaml:\"opensearch_service_name,omitempty\"`\n\tDataDir               string  `yaml:\"data_dir\"`\n\tServerType            string  `yaml:\"server_type\"`\n\tServerName            string  `yaml:\"server_name\"`\n\tInternalKey           string  `yaml:\"internal_key\"`\n\tSharedKey             string  `yaml:\"shared_key\"`\n\tUpdatesFolder         string  `yaml:\"updates_folder\"`\n\tMappingName           *string `yaml:\"mapping_name,omitempty\"`\n}\n```\n\n```go\nfunc GetConfig() *Config\n```\n\n```go\nfunc (c *Config) Set() error\n```\n\n","path":"github.com/utmstack/UTMStack/installer/config","name":"config","synopsis":"","isRedistributable":true}
