lock

package module
v0.0.0-...-8452955 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2019 License: MIT Imports: 4 Imported by: 0

README

lock

一些常用的锁,如redis锁等,和一些标准库锁的包装等

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRedisLock

func NewRedisLock(options ...RedisLockOption) *redisLock

Types

type RedisLockOption

type RedisLockOption func(*redisLockOption)

func WithRedisConn

func WithRedisConn(conn redis.UniversalClient) RedisLockOption

func WithResourceToken

func WithResourceToken(resource, token string) RedisLockOption

func WithTimeout

func WithTimeout(timeout time.Duration) RedisLockOption

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL