e9a76808df
Simplify the use of clistate.Lock by creating a clistate.Locker instance, which stores the context of locking a state, to allow unlock to be called without knowledge of how the state was locked. This alows the backend code to bring the needed UI methods to the point where the state is locked, and still unlock the state from an outer scope. Provide a NoopLocker as well, so that callers can always call Unlock without verifying the status of the lock. Add the StateLocker field to the backend.Operation, so that the state lock can be carried between the different function scopes of the backend code. This will allow the backend context to lock the state before it's read, while allowing the different operations to unlock the state when they complete. |
||
---|---|---|
.. | ||
test-fixtures | ||
backend.go | ||
backend_apply.go | ||
backend_apply_test.go | ||
backend_local.go | ||
backend_plan.go | ||
backend_plan_test.go | ||
backend_refresh.go | ||
backend_refresh_test.go | ||
backend_test.go | ||
cli.go | ||
counthookaction_string.go | ||
hook_count.go | ||
hook_count_action.go | ||
hook_count_test.go | ||
hook_state.go | ||
hook_state_test.go | ||
local_test.go | ||
testing.go |