config

package
v0.4.100 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AppManagementConfigFilePath    = filepath.Join(constants.DefaultConfigPath, "app-management.conf")
	AppManagementGlobalEnvFilePath = filepath.Join(constants.DefaultConfigPath, "env")
	RemoveRuntimeIfNoNvidiaGPUFlag = false
)
View Source
var (
	CommonInfo = &model.CommonModel{
		RuntimePath: constants.DefaultRuntimePath,
	}

	AppInfo = &model.APPModel{
		AppStorePath: filepath.Join(constants.DefaultDataPath, "appstore"),
		AppsPath:     filepath.Join(constants.DefaultDataPath, "apps"),
		DataPath:     constants.DefaultDataPath,
		LogPath:      constants.DefaultLogPath,
		LogSaveName:  common.AppManagementServiceName,
		LogFileExt:   "log",

		LogsPath:          "/DATA/AppData/casaos/logs",
		LogsRetentionDays: 7,
		LogsMaxSizeMB:     2048,
	}

	ServerInfo = &model.ServerModel{
		AppStoreList: []string{},
	}

	// Global is a map to inject environment variables to the app. Requests change it while
	// the save after each change and every app that starts read it: outside this package,
	// go through SetGlobal, DeleteGlobal and Globals.
	Global = make(map[string]string)

	CasaOSGlobalVariables = &model.CasaOSGlobalVariables{}

	Cfg               *ini.File
	ConfigFilePath    string
	GlobalEnvFilePath string
)

Functions

func DeleteGlobal added in v0.4.100

func DeleteGlobal(key string)

func Globals added in v0.4.100

func Globals() map[string]string

Globals is a copy of the variables: the caller reads it while requests change them.

func InitGlobal

func InitGlobal(config string)

func InitSetup

func InitSetup(config string, sample string)

func ReloadConfig

func ReloadConfig()

func SaveGlobal

func SaveGlobal() error

func SaveSetup

func SaveSetup() error

func SetGlobal added in v0.4.100

func SetGlobal(key, value string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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