Documentation ¶
Index ¶
- func Close()
- func Connect(servers []string, options ...Option)
- func Get(ctx context.Context, key string) (val string, isNotExist bool, err error)
- func Put(ctx context.Context, key, value string, ttl int64) (err error)
- func UnlockAndClose(ctx context.Context, lock *Locker) (err error)
- type Locker
- type Option
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Locker ¶
type Locker struct {
// contains filtered or unexported fields
}
func NewLockerAndLock ¶
NewLockerAndLock 新建锁+锁key
Click to show internal directories.
Click to hide internal directories.