diff

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 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

	// Actions is a generated, ordered list of actions that need to be executed in order to get from an actual state to the desired state
	Actions []action.Base
}

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 two given policy resolution structs (actual and desired states). It iterates over all component instances and 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.

Jump to

Keyboard shortcuts

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