Files
rootandClaude Opus 5 8679200f41 Initial commit
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 13:57:10 +08:00

12 lines
320 B
Go

package redis
import (
"github.com/go-redsync/redsync/v4"
"github.com/go-redsync/redsync/v4/redis/goredis"
)
// BuildLock 构建redis分布式锁。
func BuildLock(client *Client, key string, options ...redsync.Option) *redsync.Mutex {
return redsync.New(goredis.NewPool(client.client)).NewMutex(key, options...)
}