file_lock

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrLockRequired

type ErrLockRequired struct {
	Operation string
}

func (ErrLockRequired) Error

func (err ErrLockRequired) Error() string

func (ErrLockRequired) GetErrorType

func (err ErrLockRequired) GetErrorType() pkgErrDisamb

func (ErrLockRequired) Is

func (err ErrLockRequired) Is(target error) bool

type ErrUnableToAcquireLock

type ErrUnableToAcquireLock struct {
	Path string
	// contains filtered or unexported fields
}

func (ErrUnableToAcquireLock) Error

func (err ErrUnableToAcquireLock) Error() string

func (ErrUnableToAcquireLock) GetErrorCause

func (err ErrUnableToAcquireLock) GetErrorCause() []string

func (ErrUnableToAcquireLock) GetErrorRecovery

func (err ErrUnableToAcquireLock) GetErrorRecovery() []string

func (ErrUnableToAcquireLock) GetErrorType

func (err ErrUnableToAcquireLock) GetErrorType() pkgErrDisamb

func (ErrUnableToAcquireLock) Is

func (err ErrUnableToAcquireLock) Is(target error) bool

func (ErrUnableToAcquireLock) Recover

type Lock

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

func New

func New(
	envUI env_ui.Env,
	path string,
	description string,
) (l *Lock)

TODO switch to using context

func (*Lock) IsAcquired

func (lock *Lock) IsAcquired() (acquired bool)

func (*Lock) Lock

func (lock *Lock) Lock() (err error)

func (*Lock) Path

func (lock *Lock) Path() string

func (*Lock) Unlock

func (lock *Lock) Unlock() (err error)

Source Files

  • errors.go
  • lock.go

Jump to

Keyboard shortcuts

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