mutexlocker

package
v0.20.2 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Locker

type Locker struct {
	// contains filtered or unexported fields
}

Locker - comment struct.

func New

func New() *Locker

New - создаёт объект Locker.

func (*Locker) Lock

func (l *Locker) Lock(ctx context.Context, key string) (unlock func(), err error)

Lock - comment method.

func (*Locker) LockWithExpiry

func (l *Locker) LockWithExpiry(ctx context.Context, key string, expiry time.Duration) (unlock func(), err 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