Documentation ¶
Index ¶
- func ExecCanceledError(cmd []string) *execCanceledErr
- func ExecTimeoutError(args []string, duration time.Duration) *execTimeoutErr
- func ExecuteMockData(rawMockData string) int
- type Executor
- func (e *Executor) Format(ctx context.Context, input []byte) ([]byte, error)
- func (e *Executor) FormatterForVersion(v string) (Formatter, error)
- func (e *Executor) GetExecPath() string
- func (e *Executor) ProviderSchemas(ctx context.Context) (*tfjson.ProviderSchemas, error)
- func (e *Executor) SetExecLogPath(path string)
- func (e *Executor) SetLogger(logger *log.Logger)
- func (e *Executor) SetTimeout(duration time.Duration)
- func (e *Executor) SetWorkdir(workdir string)
- func (e *Executor) Version(ctx context.Context) (string, error)
- func (e *Executor) VersionIsSupported(ctx context.Context, c version.Constraints) error
- type ExecutorFactory
- type ExitError
- type Formatter
- type MockCall
- type MockItem
- type MockItemDispenser
- type MockQueue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExecCanceledError ¶
func ExecCanceledError(cmd []string) *execCanceledErr
func ExecTimeoutError ¶
func ExecuteMockData ¶
Types ¶
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
func NewExecutor ¶
func (*Executor) FormatterForVersion ¶ added in v0.5.0
func (*Executor) GetExecPath ¶
func (*Executor) ProviderSchemas ¶
func (*Executor) SetExecLogPath ¶
func (*Executor) SetTimeout ¶
func (*Executor) SetWorkdir ¶
type ExecutorFactory ¶ added in v0.4.0
ExecutorFactory can be used in external consumers of exec pkg to enable easy swapping with MockExecutor
func MockExecutor ¶
func MockExecutor(md MockItemDispenser) ExecutorFactory
type MockCall ¶
type MockCall MockItem
func (*MockCall) MarshalJSON ¶
func (*MockCall) NextMockItem ¶
type MockItem ¶
type MockItem struct { Args []string `json:"args"` Stdout string `json:"stdout"` Stderr string `json:"stderr"` SleepDuration time.Duration `json:"sleep"` ExitCode int `json:"exit_code"` MockError string `json:"error"` }
func (*MockItem) MarshalJSON ¶
func (*MockItem) UnmarshalJSON ¶
type MockItemDispenser ¶
type MockItemDispenser interface {
NextMockItem() *MockItem
}
Click to show internal directories.
Click to hide internal directories.