|
|
@ -23,17 +23,22 @@ const (
|
|
|
|
ProMode = "pro"
|
|
|
|
ProMode = "pro"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
// A ServiceConf is a service config.
|
|
|
|
type (
|
|
|
|
type ServiceConf struct {
|
|
|
|
// DevServerConfig is type alias for devserver.Config
|
|
|
|
Name string
|
|
|
|
DevServerConfig = devserver.Config
|
|
|
|
Log logx.LogConf
|
|
|
|
|
|
|
|
Mode string `json:",default=pro,options=dev|test|rt|pre|pro"`
|
|
|
|
// A ServiceConf is a service config.
|
|
|
|
MetricsUrl string `json:",optional"`
|
|
|
|
ServiceConf struct {
|
|
|
|
// Deprecated: please use DevServer
|
|
|
|
Name string
|
|
|
|
Prometheus prometheus.Config `json:",optional"`
|
|
|
|
Log logx.LogConf
|
|
|
|
Telemetry trace.Config `json:",optional"`
|
|
|
|
Mode string `json:",default=pro,options=dev|test|rt|pre|pro"`
|
|
|
|
DevServer devserver.Config `json:",optional"`
|
|
|
|
MetricsUrl string `json:",optional"`
|
|
|
|
}
|
|
|
|
// Deprecated: please use DevServer
|
|
|
|
|
|
|
|
Prometheus prometheus.Config `json:",optional"`
|
|
|
|
|
|
|
|
Telemetry trace.Config `json:",optional"`
|
|
|
|
|
|
|
|
DevServer DevServerConfig `json:",optional"`
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
// MustSetUp sets up the service, exits on error.
|
|
|
|
// MustSetUp sets up the service, exits on error.
|
|
|
|
func (sc ServiceConf) MustSetUp() {
|
|
|
|
func (sc ServiceConf) MustSetUp() {
|
|
|
|