Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LockerAdapter ¶ added in v0.11.0
type LockerAdapter struct {
// contains filtered or unexported fields
}
LockerAdapter - адаптер для работы с сетевыми блокировками на основе Redis.
func NewLockerAdapter ¶
func NewLockerAdapter(conn redis.UniversalClient) *LockerAdapter
NewLockerAdapter - создаёт объект LockerAdapter.
func (*LockerAdapter) Lock ¶ added in v0.11.0
func (l *LockerAdapter) Lock(ctx context.Context, key string) (func(), error)
Lock - comment method.
func (*LockerAdapter) LockWithExpiry ¶ added in v0.11.0
func (l *LockerAdapter) LockWithExpiry(ctx context.Context, key string, expiry time.Duration) (func(), error)
LockWithExpiry - if expiry = 0 then set expiry by default.
Click to show internal directories.
Click to hide internal directories.