mrredislock

package
v0.16.4 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

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.

Jump to

Keyboard shortcuts

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