config

package
v0.0.0-...-4d12b9b Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2026 License: AGPL-3.0 Imports: 8 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	RegisterInstanceEndpoint      = "/api/v1/instances/register"
	GetInstanceDetailsEndpoint    = "/api/v1/instances"
	UpdateInstanceDetailsEndpoint = "/api/v1/instances/details"
	HeartbeatEndpoint             = "/api/v1/instances/heartbeat"
	GetUpdatesInfoEndpoint        = "/api/v1/updates"
	SetUpdateSentEndpoint         = "/api/v1/updates/sent"
	GetLicenseEndpoint            = "/api/v1/licenses"
	HealthEndpoint                = "/api/v1/health"
	UsageReportEndpoint           = "/api/v1/usage"

	GitHubReleasesURL = "https://github.com/utmstack/UTMStack/releases/download/%s/installer"

	ImagesPath         = "/utmstack/images"
	InstallerBinPath   = "/usr/local/bin/utmstack_installer"
	InstallerAliasPath = "/usr/local/bin/utmstack"

	RequiredMinCPUCores  = 2
	RequiredMinDiskSpace = 30
	RequiredDistroUbuntu = "ubuntu"
	RequiredDistroDebian = "debian"
	RequiredDistroRHEL   = "redhat"
)

Variables

View Source
var (
	DEFAULT_BRANCH    string
	INSTALLER_VERSION string
	REPLACE           string
	PUBLIC_KEY        string

	ConfigPath             = filepath.Join("/root", "utmstack.yml")
	InstanceConfigPath     = filepath.Join(GetConfig().UpdatesFolder, "instance-config.yml")
	ServiceLogPath         = filepath.Join(GetConfig().UpdatesFolder, "logs", "utmstack-updater.log")
	VersionFilePath        = filepath.Join(GetConfig().UpdatesFolder, "version.json")
	OldVersionFilePath     = filepath.Join(GetConfig().UpdatesFolder, "version-old.json")
	LicenseFilePath        = filepath.Join(GetConfig().UpdatesFolder, "LICENSE")
	PendingUpdatesPath     = filepath.Join(GetConfig().UpdatesFolder, "pending-updates.json")
	MemoryAllocationPath   = filepath.Join(GetConfig().UpdatesFolder, "memory-allocation.json")
	LastAdminEmailPath     = filepath.Join(GetConfig().UpdatesFolder, "last-admin-email.txt")
	EventProcessorLogsPath = filepath.Join(GetConfig().DataDir, "events-engine-workdir", "logs")
	CheckUpdatesEvery      = 5 * time.Minute
	ConnectedToInternet    = false
)

Functions

func DetectAirGapMode

func DetectAirGapMode() bool

func GetCMServer

func GetCMServer() string

func GetProductSlug

func GetProductSlug() string

func Logger

func Logger() *twlogger.Logger

Types

type Config

type Config struct {
	MainServer            string  `yaml:"main_server"`
	Branch                string  `yaml:"branch"`
	Password              string  `yaml:"password"`
	OpenSearchPassword    string  `yaml:"opensearch_password"`
	OpenSearchServiceName string  `yaml:"opensearch_service_name,omitempty"`
	DataDir               string  `yaml:"data_dir"`
	ServerType            string  `yaml:"server_type"`
	ServerName            string  `yaml:"server_name"`
	InternalKey           string  `yaml:"internal_key"`
	SharedKey             string  `yaml:"shared_key"`
	UpdatesFolder         string  `yaml:"updates_folder"`
	MappingName           *string `yaml:"mapping_name,omitempty"`
}

func GetConfig

func GetConfig() *Config

func (*Config) Set

func (c *Config) Set() error

Jump to

Keyboard shortcuts

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