add state.Locker interface
Changed from state.StateLocker to remove the stutter. State implementations can provide Lock/Unlock methods to lock the state file. Remote clients can also provide these same methods, which will be called through remote.State.
This commit is contained in:
parent
be9fc64967
commit
cc0712edab
|
@ -40,3 +40,9 @@ type StateRefresher interface {
|
|||
type StatePersister interface {
|
||||
PersistState() error
|
||||
}
|
||||
|
||||
// Locker is implemented to lock state during command execution.
|
||||
type Locker interface {
|
||||
Lock(reason string) error
|
||||
Unlock() error
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue