action

package
v0.1.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadMonitorPolicy

func DownloadMonitorPolicy(config *runner.Config) ([]byte, error)

func ErrorHandler

func ErrorHandler(config *runner.Config, reportKind, description string) error

func GetWriters

func GetWriters(config *runner.Config) (io.Writer, io.Writer, error)

func MonitorAfterApply

func MonitorAfterApply(
	r *RunnerAction,
	policyBytes []byte,
) (*types.CreateMonitorResultRequest, error)

func MonitorAfterDestroy

func MonitorAfterDestroy(
	r *RunnerAction,
	policyBytes []byte,
) (*types.CreateMonitorResultRequest, error)

func MonitorAfterPlan

func MonitorAfterPlan(
	r *RunnerAction,
	policyBytes []byte,
) (*types.CreateMonitorResultRequest, error)

func MonitorBeforeApply

func MonitorBeforeApply(
	r *RunnerAction,
	policyBytes []byte,
) (*types.CreateMonitorResultRequest, error)

func MonitorBeforeDestroy

func MonitorBeforeDestroy(
	r *RunnerAction,
	policyBytes []byte,
) (*types.CreateMonitorResultRequest, error)

func MonitorBeforePlan

func MonitorBeforePlan(
	r *RunnerAction,
	policyBytes []byte,
) (*types.CreateMonitorResultRequest, error)

func MonitorPlan

func MonitorPlan(
	r *RunnerAction,
	policyBytes []byte,
) (*types.CreateMonitorResultRequest, error)

func MonitorState

func MonitorState(
	r *RunnerAction,
	policyBytes []byte,
) (*types.CreateMonitorResultRequest, error)

func RunMonitorFunc

func RunMonitorFunc(f MonitorFunc, action *RunnerAction, rc *runner.Config) (string, error)

func SuccessHandler

func SuccessHandler(config *runner.Config, reportKind, description string) error

Types

type MonitorFunc

type MonitorFunc func(
	r *RunnerAction,
	policyBytes []byte,
) (*types.CreateMonitorResultRequest, error)

type PrettyWriter

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

func (*PrettyWriter) Write

func (p *PrettyWriter) Write(log []byte) (int, error)

type RunnerAction

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

func NewRunnerAction

func NewRunnerAction(opts *RunnerActionOpts) *RunnerAction

func (*RunnerAction) Apply

func (r *RunnerAction) Apply(
	variables map[string]interface{},
) ([]byte, error)

func (*RunnerAction) Destroy

func (r *RunnerAction) Destroy(
	variables map[string]interface{},
) error

func (*RunnerAction) Init

func (r *RunnerAction) Init() error

func (*RunnerAction) Plan

func (r *RunnerAction) Plan(variables map[string]interface{}) ([]byte, []byte, []byte, error)

type RunnerActionOpts

type RunnerActionOpts struct {
	Config       *runner.Config
	StdoutWriter io.Writer
	StderrWriter io.Writer
	ErrHandler   actionHandler
	ReportKind   string

	// Whether a `terraform init` should be run before plan/apply operations
	RequireInit bool
}

Jump to

Keyboard shortcuts

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