executor

package
v0.4.0-alfa5 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultLogWriter io.Writer

DefaultLogWriter default logging driver to write stdout.

View Source
var Env []string

Env - global list of environment variables.

Functions

This section is empty.

Types

type BashRunner

type BashRunner struct {
	Env       []string
	Timeout   time.Duration
	LogLabels []string
	// contains filtered or unexported fields
}

BashRunner - runs shell commands.

func NewBashRunner

func NewBashRunner(workingDir string, envVariables ...string) (*BashRunner, error)

NewBashRunner - create new bash runner.

func (*BashRunner) Run

func (b *BashRunner) Run(command string, secrets ...string) error

Run - exec command and hide secrets in log output.

func (*BashRunner) RunMutely

func (b *BashRunner) RunMutely(command string, secrets ...string) (string, string, error)

RunMutely - exec command and hide secrets in output. Return command output and errors output.

type KubectlRunner

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

KubectlRunner - exec kubectl commands.

func NewKubectlRunner

func NewKubectlRunner(workingDir string, kubeConfig []byte) (*KubectlRunner, error)

NewKubectlRunner create kubectl runner.

func (*KubectlRunner) Clear

func (k *KubectlRunner) Clear()

Clear remove tmp dir.

func (*KubectlRunner) Run

func (k *KubectlRunner) Run(args ...string) error

Run - common function to prepare and run kubectl commands in bash shell.

type TerraformRunner

type TerraformRunner struct {
	LogLabels []string
	// contains filtered or unexported fields
}

TerraformRunner - exec terraform commands.

func NewTerraformRunner

func NewTerraformRunner(workingDir string, envVariables ...string) (*TerraformRunner, error)

NewTerraformRunner create terraform runner.

func (*TerraformRunner) Apply

func (tr *TerraformRunner) Apply(tfVars interface{}, args ...string) error

Apply - exec terraform apply.

func (*TerraformRunner) ApplyPlan

func (tr *TerraformRunner) ApplyPlan(planFileName string, args ...string) error

ApplyPlan - exec terraform apply.

func (*TerraformRunner) Clear

func (tr *TerraformRunner) Clear() error

Clear - remove .terraform

func (*TerraformRunner) Destroy

func (tr *TerraformRunner) Destroy(tfVars interface{}, args ...string) error

Destroy - exec terraform apply.

func (*TerraformRunner) Import

func (tr *TerraformRunner) Import(tfVars interface{}, args ...string) error

Import - exec terraform apply.

func (*TerraformRunner) Init

func (tr *TerraformRunner) Init(backendConfig interface{}) error

Init - exec terraform init.

func (*TerraformRunner) Plan

func (tr *TerraformRunner) Plan(tfVars interface{}, args ...string) error

Plan - exec terraform plan.

func (*TerraformRunner) SetLogLabels

func (tr *TerraformRunner) SetLogLabels(logLabels []string)

SetLogLabels add log labels to hiden log output.

func (*TerraformRunner) Version

func (tr *TerraformRunner) Version() (string, error)

Version - exec terraform version.

Jump to

Keyboard shortcuts

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