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:
James Bardin 2017-03-31 16:30:51 -04:00
parent 835792018a
commit bf6384a163
2 changed files with 9 additions and 0 deletions

View File

@ -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
}

View File

@ -28,6 +28,7 @@ type State interface {
StateWriter
StateRefresher
StatePersister
Locker
}
// StateReader is the interface for things that can return a state. Retrieving