Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCLIRunner ¶
NewCLIRunner returns a [cliRunner] for the given binary path and API key. An empty binaryPath defaults to "cre" (resolved via PATH).
Types ¶
type CLIRunner ¶
type CLIRunner interface {
Run(ctx context.Context, args ...string) (*CallResult, error)
}
CLIRunner is the interface for running the CRE binary as a subprocess (v1 / CLI access). The default implementation is created by NewCLIRunner.
type CallResult ¶
CallResult holds stdout, stderr, and exit code from a completed CRE call.
type Client ¶ added in v0.93.0
type Client interface{}
Client is a placeholder for the future CRE v2 Go client. No methods yet—the real API will be added when the CRE Go library is integrated. TODO: Add methods (e.g. DeployWorkflow) and supporting config types once the library contract is clear. TODO: Revisit layout: consider moving Client and concrete clients to a dedicated file or subpackage when the surface grows.
type ExitError ¶
ExitError is returned when the CRE process ran and exited with a non-zero code. Use errors.As to inspect ExitCode, Stdout, and Stderr. Result is still returned from Run (CLIRunner.Run) so callers can log or inspect output.
type Runner ¶
Runner groups CLI and Go API access to CRE (v1 subprocess + v2 client).
func NewRunner ¶ added in v0.93.0
func NewRunner(opts ...RunnerOption) Runner
NewRunner returns a Runner with the given options applied.
type RunnerOption ¶ added in v0.93.0
type RunnerOption func(*runner)
RunnerOption configures a [runner] instance for NewRunner.
func WithCLI ¶ added in v0.93.0
func WithCLI(cli CLIRunner) RunnerOption
WithCLI sets the CLI CLIRunner.
func WithClient ¶ added in v0.93.0
func WithClient(client Client) RunnerOption
WithClient sets the Go API Client.