feat config

This commit is contained in:
2025-12-11 11:12:36 +08:00
parent d6f770fbb3
commit 71d4e593c7
19 changed files with 229 additions and 326 deletions

View File

@@ -7,6 +7,7 @@ import (
clientv3 "go.etcd.io/etcd/client/v3"
)
// NewLeaseAndKeepAlive 创建租约并保活
func NewLeaseAndKeepAlive(ttl int64) (clientv3.LeaseID, error) {
lease, err := etcd.Client().Grant(context.Background(), ttl)
if err != nil {