Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mutex ¶
type Mutex struct {
// contains filtered or unexported fields
}
Mutex is a distributed lock based on PostgreSQL advisory locks
func (*Mutex) GetResourceID ¶
GetResourceID returns the lock ID.
func (*Mutex) SyncMutex ¶
SyncMutex is a wrapper around Mutex that implements sync.Locker interface.
type Option ¶
Option is a functional option type for configuring Mutex.
func WithConnStr ¶
WithConnStr creates new PGX connection from a connection string.
func WithContext ¶
WithContext sets a custom context for the Mutex operations.
func WithResourceID ¶
WithResourceID sets the lock ID for advisory locking.
type SyncMutex ¶
type SyncMutex struct {
// contains filtered or unexported fields
}
func NewSyncMutex ¶
Click to show internal directories.
Click to hide internal directories.