actions

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IsOn          = "ison"
	PowerOn       = "poweron"
	PowerOff      = "poweroff"
	PowerCycle    = "powercycle"
	PowerCycleBmc = "powercyclebmc"
	Reseat        = "reseat"

	PxeOnce = "pxeonce"

	Screenshot = "screenshot"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Action added in v1.2.0

type Action struct {
	// contains filtered or unexported fields
}

type ActionFn added in v1.2.0

type ActionFn func() ActionResult

type ActionResult added in v1.2.0

type ActionResult struct {
	Action  string
	Status  bool
	Message string
	Error   error
}

func NewActionResult added in v1.2.0

func NewActionResult(action string, status bool, message string, err error) ActionResult

type ExecutionPlan added in v1.2.0

type ExecutionPlan struct {
	// contains filtered or unexported fields
}

func (*ExecutionPlan) Run added in v1.2.0

func (p *ExecutionPlan) Run() ([]ActionResult, error)

type Executor added in v1.2.0

type Executor interface {
	Validate(string) error
	Run(string) ActionResult
	Cleanup()
}

type ExecutorFactory added in v1.2.0

type ExecutorFactory interface {
	New(map[string]interface{}) (Executor, error)
}

type PlanMaker added in v1.2.0

type PlanMaker struct {
	// contains filtered or unexported fields
}

func NewPlanMaker added in v1.2.0

func NewPlanMaker(executorFactories ...ExecutorFactory) *PlanMaker

func (*PlanMaker) MakePlan added in v1.2.0

func (e *PlanMaker) MakePlan(actionsRaw []string, params map[string]interface{}) (*ExecutionPlan, error)

Jump to

Keyboard shortcuts

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