Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AppTasksConfig map[string]TaskConfig
Functions ¶
func GetDefaultFileNameWithExtension ¶
func GetDefaultFileNameWithExtension() string
func InitConfig ¶
func InitConfig()
Types ¶
type CheckFrequency ¶
type CommandCheck ¶
type CommandCheck struct {
Scripts []string `mapstructure:"scripts"`
}
type HTTPCheck ¶
type HTTPCheck struct {
URL string `mapstructure:"url"`
Expect *HttpCheckExpect `mapstructure:"expect"`
}
HTTPCheck 定義了 HTTP 健康檢查的配置
type HealthCheckConfig ¶
type HealthCheckConfig struct {
HTTP *HTTPCheck `mapstructure:"http"`
Command *CommandCheck `mapstructure:"command"`
Frequency *CheckFrequency `mapstructure:"frequency"`
}
HealthCheckConfig 定義了應用程式的健康檢查配置
type HttpCheckExpect ¶
type HttpCheckExpect struct {
Json *HttpCheckExpectJson `mapstructure:"json"`
Plain *HttpCheckExpectPlain `mapstructure:"plain"`
}
type HttpCheckExpectJson ¶
type HttpCheckExpectPlain ¶
type HttpCheckExpectPlain struct {
Contains string `mapstructure:"contains"`
}
type LauncherConfig ¶
type LauncherConfig struct {
Tasks []TaskConfig `mapstructure:"tasks"`
}
LauncherConfig 定義了整個 dgrkt.yaml 的根配置
var AppConfig LauncherConfig
func (*LauncherConfig) Validate ¶
func (lc *LauncherConfig) Validate() error
type TaskConfig ¶
type TaskConfig struct {
Name string `mapstructure:"name"`
BaseDir string `mapstructure:"base_dir"`
Envs []string `mapstructure:"envs"`
Executable string `mapstructure:"executable"`
Args []string `mapstructure:"args"`
Healthcheck HealthCheckConfig `mapstructure:"healthcheck"`
DependsOn []string `mapstructure:"depends_on"`
}
TaskConfig 定義了單個應用程式的配置
type TaskConfigCheck ¶
type TaskConfigCheck int
const ( Unvisited TaskConfigCheck = iota // 0: 未訪問 Visiting // 1: 正在訪問 (當前路徑中) Visited // 2: 已訪問 (已完成遍歷) )
Click to show internal directories.
Click to hide internal directories.