Documentation ¶
Index ¶
Constants ¶
View Source
const CQLRetries = 5
View Source
const CQLTimeFmt = "2006-01-02 15:04:05-0700"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mutex ¶
type Mutex struct { Session *gocql.Session Keyspace string Table string LockName string LockHolder string // Lifetime is the duration that the mutex is valid after it's acquired. // It is considered stale after the duration has passed. Lifetime time.Duration // RetryTime is the duration between attempts to acquire the mutex RetryTime time.Duration // Timeout is the duration after which to give up acquiring the mutex Timeout time.Duration }
Mutex represents a mutex that is acquired by inserting a row into a Cassandra table using a lightweight transaction.
func (*Mutex) Lock ¶
Lock attempts to acquire mutex m. If the lock is already in use, the calling goroutine blocks until the mutex is available
Click to show internal directories.
Click to hide internal directories.