github.com/tarrant/terraform@v0.3.8-0.20150402012457-f68c9eee638e/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  }