🚚 Rename protobuf

This commit is contained in:
2024-10-21 22:07:36 +08:00
parent 80ad9399a3
commit 87a7eb8f45
31 changed files with 502 additions and 414 deletions

19
pkg/internal/kv/etcd.go Normal file
View File

@ -0,0 +1,19 @@
package kv
import (
clientv3 "go.etcd.io/etcd/client/v3"
"time"
)
var Kv *clientv3.Client
func ConnectEtcd(endpoints []string) error {
conn, err := clientv3.New(clientv3.Config{
Endpoints: endpoints,
DialTimeout: 10 * time.Second,
})
if err == nil {
Kv = conn
}
return err
}