Documentation ¶
Index ¶
Constants ¶
View Source
const ( PackageConfDir = "data/binaries-conf" BaseAppConfDir = "manifests/init-data" )
Variables ¶
This section is empty.
Functions ¶
func LoadApps ¶
func LoadApps(categories Categories, path string) error
LoadApps 读取指定路径上的Apps.yml并生成app信息保存到数据库中, 加载应用时会将所有相同Category的应用先置为Enabled: false, 再根据Apps.yml存在的应用置为Enabled: true, 因此每次执行时会更新所有相同Category的应用
Types ¶
type App ¶
type App struct { Name string `yaml:"name"` ShortName string `yaml:"short_name"` Desc string `yaml:"desc"` Increment bool `yaml:"increment"` Version string `yaml:"version"` Platform string `yaml:"platform"` Category string `yaml:"category"` SupportActions []string `yaml:"support_actions"` SupportMediaTypes []string `yaml:"support_media_types"` SupportGpuModels []string `yaml:"support_gpu_models"` PkgRef string `yaml:"pkg_ref"` DashboardId string `yaml:"dashboardid"` LivenessProbe LivenessProbe `yaml:"liveness_probe"` Modules []Module `yaml:"modules"` Global Global `yaml:"global"` }
type Arg ¶
type Arg struct { Name string `yaml:"name"` ShortName string `yaml:"short_name"` Desc string `yaml:"desc"` Type string `yaml:"type"` Format string `yaml:"format"` Enum []string `yaml:"enum"` HostLimits HostLimits `yaml:"host_limits"` Default interface{} `yaml:"default"` Required bool `yaml:"required"` Modifiable bool `yaml:"modifiable"` Readonly bool `yaml:"readonly"` }
type Categories ¶
type Categories []string
type HostLimits ¶
type LivenessProbe ¶
type Module ¶
type Module struct { Name string `yaml:"name"` Desc string `yaml:"desc"` SkipUpgrade bool `yaml:"skip_upgrade"` Notes string `yaml:"notes"` Args []Arg `yaml:"args"` Configs []string `yaml:"configs"` Required bool `yaml:"required"` EnableLogging bool `yaml:"enable_logging"` EnablePurgeData bool `yaml:"enable_purge_data"` Replication bool `yaml:"replication"` Resources Resources `yaml:"resources"` HostLimits HostLimits `yaml:"host_limits"` IncludeRoles []string `yaml:"include_roles"` ExtraVars map[string]interface{} `yaml:"extra_vars"` HostAliases []string `yaml:"host_aliases"` AdditionalConfigs v1.AdditionalConfigs `yaml:"additional_configs"` }
Click to show internal directories.
Click to hide internal directories.