diff

package
v0.1.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package diff allows Aptomi to determine the difference between actual state (running on the cloud) and desired state (that Aptomi wants to enforce), generating a list of actions to reconcile the difference. The generated list of actions will be passed to applier for execution.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PolicyResolutionDiff

type PolicyResolutionDiff struct {
	// Prev is actual policy resolution data
	Prev *resolve.PolicyResolution

	// Next is desired policy resolution data
	Next *resolve.PolicyResolution

	// Plan is a plan of actions to transform Prev to Next
	ActionPlan *action.Plan
}

PolicyResolutionDiff represents a difference between two policy resolution data structs (actual and desired states)

func NewPolicyResolutionDiff

func NewPolicyResolutionDiff(next *resolve.PolicyResolution, prev *resolve.PolicyResolution) *PolicyResolutionDiff

NewPolicyResolutionDiff calculates difference between prev and next policy resolution structs (actual and desired states). It figures out which component instances have to be instantiated (new consumers appeared and they didn't exist before), which component instances have to be updated (e.g. parameters changed), which component instances have to be destroyed (that have no consumers left), and so on.

Based on that it produces a graph of actions which have to be executed to transform prev to next.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL