All states are lockers
Since moving to the new backends, all states (except InmemState) are Lockers. Add the methods to the State interface to remove a heap of assertion checks.
This commit is contained in:
parent
835792018a
commit
bf6384a163
|
@ -26,3 +26,11 @@ func (s *InmemState) WriteState(state *terraform.State) error {
|
|||
func (s *InmemState) PersistState() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *InmemState) Lock(*LockInfo) (string, error) {
|
||||
return "", nil
|
||||
}
|
||||
|
||||
func (s *InmemState) Unlock(string) error {
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@ type State interface {
|
|||
StateWriter
|
||||
StateRefresher
|
||||
StatePersister
|
||||
Locker
|
||||
}
|
||||
|
||||
// StateReader is the interface for things that can return a state. Retrieving
|
||||
|
|
Loading…
Reference in New Issue