✨ feat(etcd): 添加 etcd 服务注册和 gRPC 客户端支持
- 新增 `etcd_registry.go` 文件,实现带自动重连的 etcd 服务注册功能 - 新增 `grpc_etcd.go` 文件,提供基于 etcd 的 gRPC 客户端,支持服务发现和重连机制 - 更新 `go.mod` 文件,添加 `github.com/rabbitmq/amqp091-go` 依赖 - 实现了服务注册、注销、续约及健康检查等功能,增强了连接管理能力
This commit is contained in:
2
go.mod
2
go.mod
@@ -4,6 +4,7 @@ go 1.24.0
|
||||
|
||||
require (
|
||||
github.com/go-redis/redis/v8 v8.11.5
|
||||
github.com/rabbitmq/amqp091-go v1.10.0
|
||||
go.etcd.io/etcd/client/v3 v3.6.5
|
||||
google.golang.org/grpc v1.75.1
|
||||
gorm.io/gorm v1.31.1
|
||||
@@ -19,7 +20,6 @@ require (
|
||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect
|
||||
github.com/jinzhu/inflection v1.0.0 // indirect
|
||||
github.com/jinzhu/now v1.1.5 // indirect
|
||||
github.com/rabbitmq/amqp091-go v1.10.0 // indirect
|
||||
go.etcd.io/etcd/api/v3 v3.6.5 // indirect
|
||||
go.etcd.io/etcd/client/pkg/v3 v3.6.5 // indirect
|
||||
go.uber.org/multierr v1.11.0 // indirect
|
||||
|
||||
Reference in New Issue
Block a user