plan

package
v0.0.0-...-eedacba Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2018 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ByProviderID

type ByProviderID []*InstanceRule

func (ByProviderID) Len

func (a ByProviderID) Len() int

func (ByProviderID) Less

func (a ByProviderID) Less(i, j int) bool

func (ByProviderID) Swap

func (a ByProviderID) Swap(i, j int)

type Changes

type Changes struct {
	// Rules that need to be created
	Create []*inbound.InboundRules
	// Rules that need to be updated (current data)
	UpdateOld []*inbound.InboundRules
	// Rules that need to be updated (desired data)
	UpdateNew []*inbound.InboundRules
	// Rules that need to be deleted
	Delete []*inbound.InboundRules

	Set   []*InstanceRule
	Unset []*InstanceRule
}

type InstanceRule

type InstanceRule struct {
	ProviderID string
	RulesName  string
}

type Plan

type Plan struct {
	// List of current rules
	Current []*inbound.InboundRules
	// List of desired rules
	Desired []*inbound.InboundRules
	// List of changes necessary to move towards desired state
	// Populated after calling Calculate()
	Changes *Changes
}

func (*Plan) Calculate

func (p *Plan) Calculate() *Plan

Calculate computes the actions needed to move current state towards desired state. It then passes those changes to the current policy for further processing. It returns a copy of Plan with the changes populated.

Jump to

Keyboard shortcuts

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