Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backender ¶
Backender interface Definitions of set of methods required for all state types
func InitBackend ¶
func InitBackend() Backender
InitBackend initializes the backend for reading and writing to state It checks state configuration defined in the config and returns The appropriate backend
type LocalBackend ¶
type LocalBackend struct { Path string // contains filtered or unexported fields }
LocalBackend is an implementation of State that performs all operations locally. This is the "default" state type
func (LocalBackend) GetState ¶
func (s LocalBackend) GetState() *State
GetState returns state from local source
func (LocalBackend) WriteState ¶
func (s LocalBackend) WriteState(st *State) error
WriteState writes state to local path
type ProvidersState ¶
ProvidersState represents state for providers
{ aws: { s3: [ Resource1, Resource2 ] } }
type Reader ¶
type Reader interface {
GetState() *State
}
Reader is the interface for state types that can return state resources
type RemoteBackend ¶
type RemoteBackend struct { Path string Bucket string BlobType string Region string // contains filtered or unexported fields }
RemoteBackend is an implementation of State that performs all operations in a cloud storage container e.g s3
func (RemoteBackend) GetState ¶
func (s RemoteBackend) GetState() *State
GetState returns state from remote source
func (RemoteBackend) WriteState ¶
func (s RemoteBackend) WriteState(st *State) error
WriteState writes state to remote path
type State ¶
type State struct { Current ProvidersState Desired ProvidersState }
State object: Represents a reka state consisting of current and desired state Desired state is used for resumption of resources. It stores the attributes of the resource to resume to for resources that need extra info like size of node pool to resize to
current: { aws: { s3: [ Resource1, Resource2 ] } }
desired: { aws: { s3: [ Resource1, Resource2 ] } }
State object stores state for both current and desired states of resources
func Diff ¶
func Diff(previous, current ProvidersState) State
Diff returns the difference in between two states