go 调用etcd实现分布式锁
package workerimport ( "context" "fmt" "go.etcd.io/etcd/clientv3" "time")// 分布式锁(TXN事务)type JobLock struct { // etcd客户端 Client *clientv3.Client Kv clientv3.KV Lease clientv3.Lease JobNa...