locks

package
v0.0.0-...-8aeb8a1 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lock

type Lock interface {
	// TryLock Attempts to acquire lock within given amount of time. If lock is not free by
	// that time, returns false. Otherwise, returns true
	TryLock(timeout time.Duration) (bool, error)
	Unlock()
}

Lock all operations with lock

type LockFactory

type LockFactory interface {
	CreateLock(name string) Lock
}

LockFactory creates lock and returns it (without locking)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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