go-etcd-lock:转到库以在etcd上运行锁

时间:2024-05-28 22:36:43
【文件属性】:

文件名称:go-etcd-lock:转到库以在etcd上运行锁

文件大小:26KB

文件格式:ZIP

更新时间:2024-05-28 22:36:43

Go

etcd-lock v5.0.4 进口 # Master via standard import get get github.com/Scalingo/go-etcd-lock # Last stable is v0 via gopkg.in go get gopkg.in/Scalingo/go-etcd-lock.v3vendor/github.com/Scalingo/go-etcd-lock/lock/lock 例子 l , err := lock . Acquire ( client , "/name" , 60 ) if lockErr , ok := err .( * lock. Error ); ok { // Key already locked fmt . Println ( lockErr ) return } else if err != nil {


【文件预览】:
go-etcd-lock-master
----lock()
--------prefix_test.go(459B)
--------lockmock()
--------prefix.go(186B)
--------wait.go(208B)
--------wait_test.go(743B)
--------acquire.go(4KB)
--------helpers_test.go(388B)
--------acquire_test.go(3KB)
--------release_test.go(894B)
--------release.go(246B)
----lockmock()
--------gomock_lock.go(1KB)
--------gomock_locker.go(2KB)
----.github()
--------dependabot.yml(171B)
----LICENSE(1KB)
----.gitignore(21B)
----CHANGELOG.md(2KB)
----go.sum(30KB)
----README.md(2KB)
----go.mod(2KB)

网友评论