新增etcd服务发现

This commit is contained in:
boyce
2024-04-18 18:50:12 +08:00
parent 0cf935ffa4
commit a26210f17f
10 changed files with 804 additions and 209 deletions

View File

@@ -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)
}
}
}