Documentation ¶
Overview ¶
Package rdbx provides a Redis-based transaction manager with distributed locking capabilities. This file contains the implementation of the Redis-based distributed locking mechanism.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTransactioner ¶
func NewTransactioner(dbtx DBTX, redisCLient redis.UniversalClient) *tx
Types ¶
type DBTX ¶
type DBTX interface { ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error) PrepareContext(ctx context.Context, query string) (*sql.Stmt, error) QueryContext(ctx context.Context, query string, args ...interface{}) (*Rows, error) QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row Begin() (*sql.Tx, error) Close() error }
type RedisLockOption ¶
type RedisLockOption interface {
Apply(*enabledTx)
}
RedisLockOption represents an option for the Redis-based transaction with distributed locking capabilities.
func AutoUnlock ¶
func AutoUnlock() RedisLockOption
AutoUnlock returns an option that enables automatic unlocking of the Redis-based transaction with distributed locking capabilities.
type Transactioner ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.