Documentation
¶
Index ¶
Constants ¶
View Source
const ( Stat_healthy string = "healthy" //健康 Stat_unhealthy string = "unhealthy" //出现异常 Stat_death string = "death" //请求不通 )
Variables ¶
View Source
var (
ArgsReg = regexp.MustCompile(`\$\{(\w+)\|{0,1}(.{0,1})\}`)
)
Functions ¶
func InjectConfig ¶
func InjectConfig(content string, cluster client.ClusterClient) string
Types ¶
type Health ¶
type Health struct {
Name string `yaml:"name"`
Model string `yaml:"model"`
Address string `yaml:"address"`
TimeInterval int `yaml:"time_interval"`
MaxErrorsNum int `yaml:"max_errors_num"`
}
Health ServiceHealth
type HealthStatus ¶
type Service ¶
type Service struct {
Name string `yaml:"name"`
Endpoints []*Endpoint `yaml:"endpoints,omitempty"`
ServiceHealth *Health `yaml:"health"`
After []string `yaml:"after"`
Requires []string `yaml:"requires"`
Type string `yaml:"type,omitempty"`
PreStart string `yaml:"pre_start,omitempty"`
Start string `yaml:"start"`
Stop string `yaml:"stop,omitempty"`
RestartPolicy string `yaml:"restart_policy,omitempty"`
RestartSec string `yaml:"restart_sec,omitempty"`
}
Service Service
func LoadServicesFromLocal ¶
type ServiceList ¶
type ServiceList struct {
Version string `yaml:"version"`
Services []struct {
Name string `yaml:"name"`
} `yaml:"services"`
}
service list of the node
Click to show internal directories.
Click to hide internal directories.