Documentation
¶
Overview ¶
Package easylock...
Description : easylock...
Author : go_developer@163.com<白茶清欢>
Date : 2021-02-24 6:29 下午
Package easylock ...
Description : easylock ...
Author : go_developer@163.com<白茶清欢>
Date : 2021-04-01 4:13 下午
Package easylock...
Description : easylock...
Author : go_developer@163.com<白茶清欢>
Date : 2021-02-24 10:55 下午
Package easylock...
Description : 包装各种姿势的锁
Author : go_developer@163.com<白茶清欢>
Date : 2021-02-24 6:26 下午
Package easylock...
Description : 分段的锁
Author : go_developer@163.com<白茶清欢>
Date : 2021-02-24 10:44 下午
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EasyLock ¶
type EasyLock interface { // Lock ... Lock(optionFuncList ...OptionFunc) error // Unlock ... Unlock(optionFuncList ...OptionFunc) error // RLock ... RLock(optionFuncList ...OptionFunc) error // RUnlock ... RUnlock(optionFuncList ...OptionFunc) error // GetLockCnt 获取锁总数 GetLockCnt() *LockCnt }
EasyLock ...
Author : go_developer@163.com<白茶清欢>
Date : 4:18 下午 2021/4/1
func NewLock ¶
func NewLock() EasyLock
NewLock获取普通锁实例,因为只有一把锁,flag没有意义,传空即可
Author : go_developer@163.com<白茶清欢>
Date : 10:42 下午 2021/2/24
type OptionFunc ¶
type OptionFunc func(o *option)
Option 设置option选项
Author : go_developer@163.com<白茶清欢>
Date : 4:15 下午 2021/4/1
func WithFlag ¶
func WithFlag(flag string) OptionFunc
WithFlag 设置flag
Author : go_developer@163.com<白茶清欢>
Date : 4:17 下午 2021/4/1