mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-15 16:34:44 +08:00
新增etcd服务发现
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
package service
|
||||
|
||||
import "errors"
|
||||
import (
|
||||
"github.com/duanhf2012/origin/v2/log"
|
||||
"os"
|
||||
)
|
||||
|
||||
//本地所有的service
|
||||
var mapServiceName map[string]IService
|
||||
@@ -23,8 +26,8 @@ func Init() {
|
||||
for _,s := range setupServiceList {
|
||||
err := s.OnInit()
|
||||
if err != nil {
|
||||
errs := errors.New("Failed to initialize "+s.GetName()+" service:"+err.Error())
|
||||
panic(errs)
|
||||
log.SError("Failed to initialize "+s.GetName()+" service:"+err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user