plan

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Planner

type Planner interface {
	Plan(ctx context.Context, expected []model.Resource, current []model.Resource) ([]State, error)
}

Planner knows how to make an plan of resource state based on an old group of resources and a new one.

func NewPlanner

func NewPlanner(logger log.Logger) Planner

NewPlanner returns a new planner.

type ResourceState

type ResourceState int

ResourceState represents the state of a resource.

const (
	// ResourceStateUnknown represents an unknown state
	ResourceStateUnknown ResourceState = iota
	// ResourceStateExists represents a state where the resource should exists.
	ResourceStateExists
	// ResourceStateMissing represents a state where the resource should be missing.
	ResourceStateMissing
)

type State

type State struct {
	State    ResourceState
	Resource model.Resource
}

State is the state of a plan of states.

Jump to

Keyboard shortcuts

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