exec

package
v0.12.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecCanceledError

func ExecCanceledError(method string) *execCanceledErr

func ExecTimeoutError

func ExecTimeoutError(method string, duration time.Duration) *execTimeoutErr

Types

type Executor

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

func (*Executor) Format added in v0.2.0

func (e *Executor) Format(ctx context.Context, input []byte) ([]byte, error)

func (*Executor) GetExecPath

func (e *Executor) GetExecPath() string

func (*Executor) Init added in v0.11.0

func (e *Executor) Init(ctx context.Context, opts ...tfexec.InitOption) error

func (*Executor) ProviderSchemas

func (e *Executor) ProviderSchemas(ctx context.Context) (*tfjson.ProviderSchemas, error)

func (*Executor) SetExecLogPath

func (e *Executor) SetExecLogPath(rawPath string) error

func (*Executor) SetLogger

func (e *Executor) SetLogger(logger *log.Logger)

func (*Executor) SetTimeout

func (e *Executor) SetTimeout(duration time.Duration)

func (*Executor) Validate added in v0.11.0

func (e *Executor) Validate(ctx context.Context) ([]tfjson.Diagnostic, error)

func (*Executor) Version

func (e *Executor) Version(ctx context.Context) (*version.Version, map[string]*version.Version, error)

type ExecutorFactory added in v0.4.0

type ExecutorFactory func(workDir, execPath string) (TerraformExecutor, error)

ExecutorFactory can be used in external consumers of exec pkg to enable easy swapping with MockExecutor

func NewMockExecutor added in v0.8.0

func NewMockExecutor(calls []*mock.Call) ExecutorFactory

type ExitError

type ExitError struct {
	Err    *exec.ExitError
	CtxErr error

	Method string
}

func (*ExitError) Error

func (e *ExitError) Error() string

func (*ExitError) Unwrap

func (e *ExitError) Unwrap() error

type Formatter added in v0.5.0

type Formatter func(ctx context.Context, input []byte) ([]byte, error)

type TerraformExecutor added in v0.8.0

type TerraformExecutor interface {
	SetLogger(logger *log.Logger)
	SetExecLogPath(path string) error
	SetTimeout(duration time.Duration)
	GetExecPath() string
	Init(ctx context.Context, opts ...tfexec.InitOption) error
	Format(ctx context.Context, input []byte) ([]byte, error)
	Version(ctx context.Context) (*version.Version, map[string]*version.Version, error)
	Validate(ctx context.Context) ([]tfjson.Diagnostic, error)
	ProviderSchemas(ctx context.Context) (*tfjson.ProviderSchemas, error)
}

func NewExecutor

func NewExecutor(workDir, execPath string) (TerraformExecutor, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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