Documentation ¶
Overview ¶
Package operation contains code for basic operations like Apply, Preview and Destroy
Index ¶
- func DiffReport(prior, plan, mode string) (string, error)
- func DiffWithRequestResourceAndState(plan *models.Spec, latest *states.State) (string, error)
- func NewApplyGraph(m *models.Spec, priorState *states.State) (*dag.AcyclicGraph, status.Status)
- func NewDestroyGraph(resource models.Resources) (*dag.AcyclicGraph, status.Status)
- type ApplyOperation
- type ApplyRequest
- type ApplyResponse
- type DestroyOperation
- type DestroyRequest
- type Diff
- type DiffRequest
- type PreviewOperation
- type PreviewRequest
- type PreviewResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DiffReport ¶
func NewApplyGraph ¶
func NewDestroyGraph ¶
Types ¶
type ApplyOperation ¶
func (*ApplyOperation) Apply ¶ added in v0.4.4
func (ao *ApplyOperation) Apply(request *ApplyRequest) (rsp *ApplyResponse, st status.Status)
Apply means turn all actual infra resources into the desired state described in the request by invoking a specified Runtime. Like other operations, Apply has 3 main steps during the whole process.
- parse resources and their relationship to build a DAG and should take care of those resources that will be deleted
- walk this DAG and execute all graph nodes concurrently, besides the entire process should follow dependencies in this DAG
- during the execution of each node, it will invoke different runtime according to the resource type
type ApplyRequest ¶
type ApplyResponse ¶
type DestroyOperation ¶
func (*DestroyOperation) Destroy ¶ added in v0.4.4
func (do *DestroyOperation) Destroy(request *DestroyRequest) (st status.Status)
Destroy will delete all resources in this request. The whole process is similar to the operation Apply, but every node's execution is deleting the resource.
type DestroyRequest ¶
type Diff ¶
type Diff struct {
StateStorage states.StateStorage
}
type DiffRequest ¶
type PreviewOperation ¶
func (*PreviewOperation) Preview ¶ added in v0.4.4
func (po *PreviewOperation) Preview(request *PreviewRequest) (rsp *PreviewResponse, s status.Status)
Preview compute all changes between resources in request and the actual infrastructure. The whole process is similar to the operation Apply, but the execution of each node is mocked and will not actually invoke the Runtime
type PreviewRequest ¶
type PreviewResponse ¶
type PreviewResponse struct {
Order *opsmodels.ChangeOrder
}