Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LocalLock ¶
type LocalLock struct {
// contains filtered or unexported fields
}
LocalLock is used for local locking in a single server
func GetLocalLock ¶
func GetLocalLock(ctx iface.OrdaContext, lockName string) *LocalLock
GetLocalLock returns a LocalLock with the specified name
type RedisLock ¶
type RedisLock struct {
// contains filtered or unexported fields
}
RedisLock is used for distributed locking among multiple servers
func GetRedisLock ¶
func GetRedisLock(ctx iface.OrdaContext, lockName string, rs *redsync.Redsync) *RedisLock
GetRedisLock returns a RedisLock with the specified name
Click to show internal directories.
Click to hide internal directories.