feat: refactor go.mod.

This commit is contained in:
tx7do
2024-11-14 15:25:58 +08:00
parent 62ee65a36b
commit f3d17b9d34
9 changed files with 46 additions and 15 deletions

View File

@@ -1,16 +1,20 @@
package servicecomb
import (
servicecombKratos "github.com/go-kratos/kratos/contrib/registry/servicecomb/v2"
"github.com/go-kratos/kratos/v2/log"
servicecombClient "github.com/go-chassis/sc-client"
servicecombKratos "github.com/go-kratos/kratos/contrib/registry/servicecomb/v2"
conf "github.com/tx7do/kratos-bootstrap/api/gen/go/conf/v1"
)
// NewRegistry 创建一个注册发现客户端 - Servicecomb
func NewRegistry(c *conf.Registry) *servicecombKratos.Registry {
if c == nil || c.Servicecomb == nil {
return nil
}
cfg := servicecombClient.Options{
Endpoints: c.Servicecomb.Endpoints,
}