global

package
v0.0.0-...-62c50aa Latest Latest
Warning

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

Go to latest
Published: Mar 27, 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

func AppRepoURL

func AppRepoURL() string

func RepoURL

func RepoURL() string

func ResourceURL

func ResourceURL() string

Types

type Base

type Base struct {
	Port       string `mapstructure:"port"`
	Edition    string `mapstructure:"edition"` // [ cn / intl]
	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 ServerConfig

type ServerConfig struct {
	Base         Base      `mapstructure:"base"`
	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