Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DevMode means development mode. DevMode = "dev" // TestMode means test mode. TestMode = "test" // RtMode means regression test mode. RtMode = "rt" // PreMode means pre-release mode. PreMode = "pre" // ProMode means production mode. ProMode = "pro" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DevServerConfig ¶
DevServerConfig is type alias for devserver.Config
type Service ¶
Service is the interface that groups Start and Stop methods.
func WithStarter ¶
WithStarter wraps a Starter as a Service.
type ServiceConf ¶
type ServiceConf struct { Name string Log logx.LogConf Mode string `json:",default=pro,options=dev|test|rt|pre|pro"` MetricsUrl string `json:",optional"` // Deprecated: please use DevServer Prometheus prometheus.Config `json:",optional"` Telemetry trace.Config `json:",optional"` DevServer DevServerConfig `json:",optional"` }
A ServiceConf is a service config.
func (ServiceConf) MustSetUp ¶
func (sc ServiceConf) MustSetUp()
MustSetUp sets up the service, exits on error.
type ServiceGroup ¶
type ServiceGroup struct {
// contains filtered or unexported fields
}
A ServiceGroup is a group of services. Attention: the starting order of the added services is not guaranteed.
func (*ServiceGroup) Start ¶
func (sg *ServiceGroup) Start()
Start starts the ServiceGroup. There should not be any logic code after calling this method, because this method is a blocking one. Also, quitting this method will close the logx output.
Click to show internal directories.
Click to hide internal directories.