Documentation ¶
Index ¶
Constants ¶
View Source
const ( DevMode = "dev" TestMode = "test" PreMode = "pre" ProMode = "pro" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
func WithStarter ¶
type ServiceConf ¶
type ServiceConf struct { Name string Log logx.LogConf Mode string `json:",default=pro,options=dev|test|pre|pro"` MetricsUrl string `json:",optional"` Prometheus prometheus.Config `json:",optional"` }
func (ServiceConf) MustSetUp ¶
func (sc ServiceConf) MustSetUp()
func (ServiceConf) SetUp ¶
func (sc ServiceConf) SetUp() error
type ServiceGroup ¶
type ServiceGroup struct {
// contains filtered or unexported fields
}
func NewServiceGroup ¶
func NewServiceGroup() *ServiceGroup
func (*ServiceGroup) Add ¶
func (sg *ServiceGroup) Add(service Service)
func (*ServiceGroup) Start ¶
func (sg *ServiceGroup) Start()
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.
func (*ServiceGroup) Stop ¶
func (sg *ServiceGroup) Stop()
Click to show internal directories.
Click to hide internal directories.