|
|
@ -23,8 +23,12 @@ const (
|
|
|
|
ProMode = "pro"
|
|
|
|
ProMode = "pro"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
// A ServiceConf is a service config.
|
|
|
|
type (
|
|
|
|
type ServiceConf struct {
|
|
|
|
// DevServerConfig is type alias for devserver.Config
|
|
|
|
|
|
|
|
DevServerConfig = devserver.Config
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// A ServiceConf is a service config.
|
|
|
|
|
|
|
|
ServiceConf struct {
|
|
|
|
Name string
|
|
|
|
Name string
|
|
|
|
Log logx.LogConf
|
|
|
|
Log logx.LogConf
|
|
|
|
Mode string `json:",default=pro,options=dev|test|rt|pre|pro"`
|
|
|
|
Mode string `json:",default=pro,options=dev|test|rt|pre|pro"`
|
|
|
@ -32,8 +36,9 @@ type ServiceConf struct {
|
|
|
|
// Deprecated: please use DevServer
|
|
|
|
// Deprecated: please use DevServer
|
|
|
|
Prometheus prometheus.Config `json:",optional"`
|
|
|
|
Prometheus prometheus.Config `json:",optional"`
|
|
|
|
Telemetry trace.Config `json:",optional"`
|
|
|
|
Telemetry trace.Config `json:",optional"`
|
|
|
|
DevServer devserver.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() {
|
|
|
|