tree

package
v0.0.0-...-40fa89b Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	// Name of the Action.
	Name string `yaml:"name,omitempty"`
	// Name of the exec function to use.
	ExecName string `yaml:"exec_name,omitempty"`
	// Extra arguments provided to the exec function.
	ExecArgs []string `yaml:"exec_args,omitempty"`
	// Documentation to describe detail of the action.
	Docs []string `yaml:"docs,omitempty"`
	// List of actions to determine if this action is applicable for the resource.
	Conditions []*Action `yaml:"conditions,omitempty"`
	// List of actions that must pass before executing this action's exec function.
	Dependencies []*Action `yaml:"dependencies,omitempty"`
	// List of actions used to recover this action if exec function fails.
	Recoveries []*Action `yaml:"recoveries,omitempty"`
}

Action describes how to run the action, including its dependencies, conditions, and other attributes.

type Configuration

type Configuration struct {
	// List of plans provided by configuration.
	Plans []*Plan `json:"plans,omitempty"`
}

Configuration provides the plans to be used by the recovery engine.

func ConvertConfiguration

func ConvertConfiguration(configuration *config.Configuration, shortVersion bool) *Configuration

ConvertConfiguration converts Configuration to a tree representation.

type Plan

type Plan struct {
	// Name of the Plan.
	Name string `json:"name,omitempty"`
	// Critical actions are actions which have to pass for plan to succeed.
	CriticalActions []*Action `json:"critical_actions,omitempty"`
}

Plan holds information about actions to execute.

func ConvertPlan

func ConvertPlan(name string, plan *config.Plan, shortVersion bool) *Plan

ConvertPlan converts Plan to a tree representation.

Jump to

Keyboard shortcuts

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