global

package
v0.0.0-...-4833cf2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DB           *gorm.DB
	MonitorDB    *gorm.DB
	GPUMonitorDB *gorm.DB
	TaskDB       *gorm.DB
	CoreDB       *gorm.DB
	AlertDB      *gorm.DB

	LOG   *logrus.Logger
	CONF  ServerConfig
	VALID *validator.Validate
	CACHE *badger_db.Cache
	Viper *viper.Viper

	Dir SystemDir

	Cron          *cron.Cron
	MonitorCronID cron.EntryID

	IsMaster bool

	I18n *i18n.Localizer

	AlertBaseJobID     cron.EntryID
	AlertResourceJobID cron.EntryID

	TaskCtxMap = make(map[string]context.CancelFunc)
)

Functions

This section is empty.

Types

type Base

type Base struct {
	Port       string `mapstructure:"port"`
	Version    string `mapstructure:"version"`
	EncryptKey string `mapstructure:"encrypt_key"`
	Mode       string `mapstructure:"mode"` // xpack [ Enable / Disable ]
	IsDemo     bool   `mapstructure:"is_demo"`
	InstallDir string `mapstructure:"install_dir"`
	IsOffLine  bool   `mapstructure:"is_offline"`
}

type DockerConfig

type DockerConfig struct {
	Command string
}

type LogConfig

type LogConfig struct {
	Level     string `mapstructure:"level"`
	TimeZone  string `mapstructure:"timeZone"`
	LogName   string `mapstructure:"log_name"`
	LogSuffix string `mapstructure:"log_suffix"`
	MaxBackup int    `mapstructure:"max_backup"`
}

type RemoteURL

type RemoteURL struct {
	AppRepo     string `mapstructure:"app_repo"`
	RepoUrl     string `mapstructure:"repo_url"`
	ResourceUrl string `mapstructure:"resource_url"`
}

type ServerConfig

type ServerConfig struct {
	Base         Base      `mapstructure:"base"`
	RemoteURL    RemoteURL `mapstructure:"remote_url"`
	Log          LogConfig `mapstructure:"log"`
	DockerConfig DockerConfig
}

type SystemDir

type SystemDir struct {
	BaseDir        string
	DbDir          string
	LogDir         string
	TaskDir        string
	DataDir        string
	TmpDir         string
	LocalBackupDir string

	AppDir                string
	ResourceDir           string
	IconCacheDir          string
	AppResourceDir        string
	AppInstallDir         string
	LocalAppResourceDir   string
	LocalAppInstallDir    string
	RemoteAppResourceDir  string
	CustomAppResourceDir  string
	OfflineAppResourceDir string
	RuntimeDir            string
	RecycleBinDir         string
	SSLLogDir             string
	McpDir                string
	ConvertLogDir         string
	TensorRTLLMDir        string
	FirewallDir           string
}

Jump to

Keyboard shortcuts

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