Documentation ¶
Index ¶
- func ExecCanceledError(method string) *execCanceledErr
- func ExecTimeoutError(method string, duration time.Duration) *execTimeoutErr
- func WithExecutorFactory(ctx context.Context, f ExecutorFactory) context.Context
- func WithExecutorOpts(ctx context.Context, opts *ExecutorOpts) context.Context
- type Executor
- func (e *Executor) Format(ctx context.Context, input []byte) ([]byte, error)
- func (e *Executor) Get(ctx context.Context, opts ...tfexec.GetCmdOption) error
- func (e *Executor) GetExecPath() string
- func (e *Executor) Init(ctx context.Context, opts ...tfexec.InitOption) error
- func (e *Executor) ProviderSchemas(ctx context.Context) (*tfjson.ProviderSchemas, error)
- func (e *Executor) SetExecLogPath(rawPath string) error
- func (e *Executor) SetLogger(logger *log.Logger)
- func (e *Executor) SetTimeout(duration time.Duration)
- func (e *Executor) Validate(ctx context.Context) ([]tfjson.Diagnostic, error)
- func (e *Executor) Version(ctx context.Context) (*version.Version, map[string]*version.Version, error)
- type ExecutorFactory
- type ExecutorOpts
- type ExitError
- type Formatter
- type TerraformExecutor
- type TerraformMockCalls
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecCanceledError ¶
func ExecCanceledError(method string) *execCanceledErr
func ExecTimeoutError ¶
func WithExecutorFactory ¶ added in v0.13.0
func WithExecutorFactory(ctx context.Context, f ExecutorFactory) context.Context
func WithExecutorOpts ¶ added in v0.13.0
func WithExecutorOpts(ctx context.Context, opts *ExecutorOpts) context.Context
Types ¶
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
func (*Executor) GetExecPath ¶
func (*Executor) ProviderSchemas ¶
func (*Executor) SetExecLogPath ¶
func (*Executor) SetTimeout ¶
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 ExecutorFactoryFromContext ¶ added in v0.13.0
func ExecutorFactoryFromContext(ctx context.Context) (ExecutorFactory, bool)
func NewMockExecutor ¶ added in v0.8.0
func NewMockExecutor(calls *TerraformMockCalls) ExecutorFactory
type ExecutorOpts ¶ added in v0.13.0
func ExecutorOptsFromContext ¶ added in v0.13.0
func ExecutorOptsFromContext(ctx context.Context) (*ExecutorOpts, bool)
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 Get(ctx context.Context, opts ...tfexec.GetCmdOption) 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)
Click to show internal directories.
Click to hide internal directories.