github.com/andresvia/terraform@v0.6.15-0.20160412045437-d51c75946785/state/inmem.go (about)

     1  package state
     2  
     3  import (
     4  	"github.com/hashicorp/terraform/terraform"
     5  )
     6  
     7  // InmemState is an in-memory state storage.
     8  type InmemState struct {
     9  	state *terraform.State
    10  }
    11  
    12  func (s *InmemState) State() *terraform.State {
    13  	return s.state.DeepCopy()
    14  }
    15  
    16  func (s *InmemState) RefreshState() error {
    17  	return nil
    18  }
    19  
    20  func (s *InmemState) WriteState(state *terraform.State) error {
    21  	state.IncrementSerialMaybe(s.state)
    22  	s.state = state
    23  	return nil
    24  }
    25  
    26  func (s *InmemState) PersistState() error {
    27  	return nil
    28  }