Documentation
¶
Overview ¶
Package oplockcmd binds the project operation lock to a cobra command.
Purpose: keep internal/oplock free of cobra and the command registry. The invocation decorator (cmd/commands/invocation.go) wraps every command body with Wrap; Wrap decides, from the command's registry entry, whether the body runs under the lock.
Inputs: an entry lookup (the decorator's registry resolver, a variable in tests) and the original RunE.
Outputs: a RunE that takes the lock through oplock.Guard before the body, stores the Lock in the command context (oplock.FromContext, for early release) and releases it by defer on every return and panic.
Constraints:
- A lock is taken only inside a project (config.FindNSelfRoot of cwd) and only for a command with a registry entry; the registry is not consulted outside a project, so a run there pays no canon parse.
- The class is the registry class after flag escalation: a given flag only raises the side effect and replaces the output kind (EPIC D5/D6).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.