commands

package
v0.9.16 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustParseArgs

func MustParseArgs(args []string) *plumbing.PipelineArgs

MustParseRunArgs parses the "run" arguments from the args slice. These options are provided by the scribe command and are typically not user-specified

func Run

func Run(ctx context.Context, opts *RunOpts) *exec.Cmd

Run handles the default scribe command, "scribe run". The run command attempts to run the pipeline by using "go run ...". This function will exit the program if it encounters an error. TODO: there is a function in `cmdutil` that should be able to create this command to run.

Types

type RunOpts

type RunOpts struct {
	// Version specifies the scribe version to run.
	// This value is used in generating the scribe image. A value will be provided if using the scribe CLI.
	// If no value is provided, then it will be replaced with "latest".
	Version string

	// Path specifies the path to the scribe pipeline.
	// This value is assumed to be "." if not provided.
	// This is not the same as the "Path" argument for the pipeline itself, which is required and used for code / config generation.
	Path string

	// Stdout is the stdout stream of the "go run" command that runs the pipeline
	// If it is not provided, it defaults to "os.Stdout"
	Stdout io.Writer
	// Stderr is the stderr stream of the "go run" command that runs the pipeline.
	// The stderr stream contains mostly logging info and is particularly useful if a problem is encountered.
	// If it is not provided, it defaults to "os.Stderr"
	Stderr io.Writer
	// Stdin is the stdin stream of the "go run" command that runs the pipeline.
	// The stdin stream is used to accept arguments in docker or cli mode that were not provided in command-line arguments.
	// If it is not provided, it defaults to "os.Stdin"
	Stdin io.Reader

	// Args are arguments that are passed to the scribe pipeline
	Args *plumbing.PipelineArgs
}

Jump to

Keyboard shortcuts

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