locker

package
v0.8.19 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalLocker

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

func (*LocalLocker) Lock

func (ml *LocalLocker) Lock(ctx context.Context, resource string) (Release, error)

func (*LocalLocker) LockWithtimeout

func (ml *LocalLocker) LockWithtimeout(ctx context.Context, resource string, timeout time.Duration) (Release, error)

type Locker

type Locker interface {
	Lock(ctx context.Context, resource string) (Release, error)
	LockWithtimeout(ctx context.Context, resource string, timeout time.Duration) (Release, error)
}

func InitLocalLocker

func InitLocalLocker() Locker

type Release

type Release func(context.Context) error

Jump to

Keyboard shortcuts

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