Documentation
¶
Overview ¶
Package lanelock provides authoritative Darwin cross-process lane locking.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // consider a separately configured secondary lane. ErrUnavailable = errors.New("lane lock unavailable") // ErrNilContext reports an invalid acquisition without a cancellation source. ErrNilContext = errors.New("lane lock: nil context") // ErrInvalidKey reports an acquisition attempted with an unvalidated key. ErrInvalidKey = errors.New("lane lock: invalid concurrency key") )
Functions ¶
This section is empty.
Types ¶
type AcquireError ¶
type AcquireError struct {
// contains filtered or unexported fields
}
AcquireError reports a closed, policy-relevant failure to establish authoritative lane serialization while preserving its underlying cause for local diagnostics.
func (*AcquireError) Error ¶
func (err *AcquireError) Error() string
func (*AcquireError) Is ¶
func (err *AcquireError) Is(target error) bool
Is identifies only genuine readiness failures as unavailable without hiding the underlying operating-system error from errors.Is and errors.As.
func (*AcquireError) LaneAcquisitionFailureClass ¶
func (err *AcquireError) LaneAcquisitionFailureClass() ports.LaneAcquisitionFailureClass
LaneAcquisitionFailureClass returns the safe policy-relevant acquisition class.
func (*AcquireError) Unwrap ¶
func (err *AcquireError) Unwrap() error
Unwrap returns the filesystem or operating-system failure that prevented acquisition.
type Locker ¶
type Locker struct {
// contains filtered or unexported fields
}
Locker acquires lock-file-backed operating-system locks beneath one approved root. The SecureFileWriter remains the authority for constructing the private lock directory; lock-file bytes are never interpreted as authority.
func New ¶
func New(root ports.AnchoredRoot, writer ports.SecureFileWriter) (*Locker, error)
New constructs a lane locker rooted beneath root. Creating and validating the private locks directory is deferred to Acquire so a canceled acquisition has no filesystem effects.