locker_with_retry

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LockerWithRetry

type LockerWithRetry struct {
	Locker  lockgate.Locker
	Options LockerWithRetryOptions
	Ctx     context.Context
}

func NewLockerWithRetry

func NewLockerWithRetry(ctx context.Context, locker lockgate.Locker, opts LockerWithRetryOptions) *LockerWithRetry

func (*LockerWithRetry) Acquire

func (locker *LockerWithRetry) Acquire(lockName string, opts lockgate.AcquireOptions) (acquired bool, handle lockgate.LockHandle, err error)

func (*LockerWithRetry) Release

func (locker *LockerWithRetry) Release(lock lockgate.LockHandle) (err error)

type LockerWithRetryOptions

type LockerWithRetryOptions struct {
	MaxAcquireAttempts int
	MaxReleaseAttempts int
}

Jump to

Keyboard shortcuts

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