Documentation ¶ Index ¶ type Redis func NewRedis(c *redis.Client) *Redis func (r *Redis) Lock(ctx context.Context, key string, ttl int64, options *redislock.Options) (*redislock.Lock, error) func (Redis) String() string Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Redis ¶ type Redis struct { // contains filtered or unexported fields } func NewRedis ¶ func NewRedis(c *redis.Client) *Redis NewRedis 初始化locker func (*Redis) Lock ¶ func (r *Redis) Lock(ctx context.Context, key string, ttl int64, options *redislock.Options) (*redislock.Lock, error) func (Redis) String ¶ func (Redis) String() string Source Files ¶ View all Source files redis.go Click to show internal directories. Click to hide internal directories.