Documentation ¶
Index ¶
- func TestClient(t *testing.T, c Client)
- func TestRemoteLocks(t *testing.T, a, b Client)
- type Client
- type ClientForcePusher
- type ClientLocker
- type Factory
- type Payload
- type State
- func (s *State) DisableLocks()
- func (s *State) GetRootOutputValues() (map[string]*states.OutputValue, error)
- func (s *State) Lock(info *statemgr.LockInfo) (string, error)
- func (s *State) PersistState(schemas *terraform.Schemas) error
- func (s *State) RefreshState() error
- func (s *State) State() *states.State
- func (s *State) StateForMigration() *statefile.File
- func (s *State) StateSnapshotMeta() statemgr.SnapshotMeta
- func (s *State) Unlock(id string) error
- func (s *State) WriteState(state *states.State) error
- func (s *State) WriteStateForMigration(f *statefile.File, force bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TestClient ¶
TestClient is a generic function to test any client.
func TestRemoteLocks ¶
Test the lock implementation for a remote.Client. This test requires 2 client instances, in oder to have multiple remote clients since some implementations may tie the client to the lock, or may have reentrant locks.
Types ¶
type Client ¶
Client is the interface that must be implemented for a remote state driver. It supports dumb put/get/delete, and the higher level structs handle persisting the state properly here.
type ClientForcePusher ¶
type ClientForcePusher interface { Client EnableForcePush() }
ClientForcePusher is an optional interface that allows a remote state to force push by managing a flag on the client that is toggled on by a call to EnableForcePush.
type ClientLocker ¶
ClientLocker is an optional interface that allows a remote state backend to enable state lock/unlock.
type State ¶
type State struct { Client Client // contains filtered or unexported fields }
State implements the State interfaces in the state package to handle reading and writing the remote state. This State on its own does no local caching so every persist will go to the remote storage and local writes will go to memory.
func (*State) DisableLocks ¶
func (s *State) DisableLocks()
DisableLocks turns the Lock and Unlock methods into no-ops. This is intended to be called during initialization of a state manager and should not be called after any of the statemgr.Full interface methods have been called.
func (*State) GetRootOutputValues ¶
func (s *State) GetRootOutputValues() (map[string]*states.OutputValue, error)
func (*State) PersistState ¶
statemgr.Persister impl.
func (*State) StateForMigration ¶
StateForMigration is part of our implementation of statemgr.Migrator.
func (*State) StateSnapshotMeta ¶
func (s *State) StateSnapshotMeta() statemgr.SnapshotMeta
StateSnapshotMeta returns the metadata from the most recently persisted or refreshed persistent state snapshot.
This is an implementation of statemgr.PersistentMeta.
func (*State) WriteState ¶
statemgr.Writer impl.