Documentation ¶
Index ¶
- func Apply(configFile string, continueDirectly bool) error
- func Create(tool *configmanager.Tool) (statemanager.ResourceStatus, error)
- func Delete(tool *configmanager.Tool) (bool, error)
- func Destroy(configFile string, continueDirectly bool, isForceDestroy bool) error
- func HandleOutputsReferences(smgr statemanager.Manager, options configmanager.RawOptions) []error
- func Read(tool *configmanager.Tool) (statemanager.ResourceStatus, error)
- func Remove(configFile string, continueDirectly bool, isForceDelete bool) error
- func ResourceDrifted(resourceStatusFromState, resourceStatusFromRead statemanager.ResourceStatus) (bool, error)
- func Update(tool *configmanager.Tool) (statemanager.ResourceStatus, error)
- func Verify(configFile string) bool
- type Change
- func GetChangesForApply(smgr statemanager.Manager, cfg *configmanager.Config) (changes []*Change, err error)
- func GetChangesForDelete(smgr statemanager.Manager, cfg *configmanager.Config, isForceDelete bool) (changes []*Change, err error)
- func GetChangesForDestroy(smgr statemanager.Manager, isForceDestroy bool) (changes []*Change, err error)
- type ChangeResult
- type DevStreamPlugin
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create(tool *configmanager.Tool) (statemanager.ResourceStatus, error)
Create loads the plugin and calls the Create method of that plugin.
func Delete ¶
func Delete(tool *configmanager.Tool) (bool, error)
Delete loads the plugin and calls the Delete method of that plugin.
func HandleOutputsReferences ¶
func HandleOutputsReferences(smgr statemanager.Manager, options configmanager.RawOptions) []error
HandleOutputsReferences renders outputs references in config file recursively. The parameter options will be changed.
func Read ¶
func Read(tool *configmanager.Tool) (statemanager.ResourceStatus, error)
func ResourceDrifted ¶ added in v0.9.0
func ResourceDrifted(resourceStatusFromState, resourceStatusFromRead statemanager.ResourceStatus) (bool, error)
func Update ¶
func Update(tool *configmanager.Tool) (statemanager.ResourceStatus, error)
Update loads the plugin and calls the Update method of that plugin.
Types ¶
type Change ¶
type Change struct { Tool *configmanager.Tool ActionName statemanager.ComponentAction Result *ChangeResult Description string }
Change is a wrapper for a single Tool and its Action to be executed.
func GetChangesForApply ¶
func GetChangesForApply(smgr statemanager.Manager, cfg *configmanager.Config) (changes []*Change, err error)
GetChangesForApply takes "State Manager" & "Config" then do some calculate and return a Plan. All actions should be executed is included in this Plan.changes. It generates "changes" according to: - config - state - resource status (by calling the Read() interface of the plugin)
func GetChangesForDelete ¶
func GetChangesForDelete(smgr statemanager.Manager, cfg *configmanager.Config, isForceDelete bool) (changes []*Change, err error)
GetChangesForDelete takes "State Manager" & "Config" then do some calculation and return a Plan to delete all plugins in the Config. All actions should be executed is included in this Plan.changes.
func GetChangesForDestroy ¶ added in v0.4.0
func GetChangesForDestroy(smgr statemanager.Manager, isForceDestroy bool) (changes []*Change, err error)
type ChangeResult ¶
type ChangeResult struct { Succeeded bool Error error Time string ReturnValue statemanager.ResourceStatus }
ChangeResult holds the result of a change action.
type DevStreamPlugin ¶
type DevStreamPlugin interface { // Create, Read, and Update return two results, the first being the "state" Create(configmanager.RawOptions) (statemanager.ResourceStatus, error) Read(configmanager.RawOptions) (statemanager.ResourceStatus, error) Update(configmanager.RawOptions) (statemanager.ResourceStatus, error) // Delete returns (true, nil) if there is no error; otherwise it returns (false, error) Delete(configmanager.RawOptions) (bool, error) }
DevStreamPlugin is a struct, on which Create/Read/Update/Delete interfaces are defined.