Discover Packages
openpitrix.io/openpitrix
pkg
etcd
package
Version:
v0.5.0
Opens a new window with list of versions in this module.
Published: Aug 19, 2020
License: Apache-2.0
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 10
Opens a new window with list of known importers.
Documentation Source Files Index Constants Variables Functions Types type Etcd type Mutex type Queue Connect(endpoints, prefix) (etcd) Dlock(ctx, key, cb) (etcd) DlockWithTimeout(key, timeout, cb) (etcd) NewMutex(key) (etcd) NewQueue(topic) (m) Lock(ctx) (m) Unlock(ctx) (q) Dequeue() (q) Enqueue(val)
Documentation
¶
Lock locks the mutex with a cancelable context. If the context is canceled
while trying to acquire the lock, the mutex tries to clean its stale lock entry.
Dequeue returns Enqueue()'d elements in FIFO order. If the
queue is empty, Dequeue blocks until elements are available.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.